From c5ffaa4af1a14994a5deca110b7c8c66e09ab5fc Mon Sep 17 00:00:00 2001 From: Dave Yap Date: Tue, 4 Mar 2025 14:30:56 +0800 Subject: [PATCH] Clean up Seafile script and use generated password instead of hard-coded password (#3) * Fix missing admin account creation * Update seafile-install.sh * Clean up script --- install/seafile-install.sh | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/install/seafile-install.sh b/install/seafile-install.sh index b8136db..f859f65 100644 --- a/install/seafile-install.sh +++ b/install/seafile-install.sh @@ -33,7 +33,7 @@ SEAHUB_DB="seahub_db" DB_USER="seafile" DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13) ADMIN_EMAIL="admin@localhost.local" -ADMIN_PASS="helper-scripts" +ADMIN_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13) sudo -u mysql mysql -s -e "CREATE DATABASE $CCNET_DB CHARACTER SET utf8;" sudo -u mysql mysql -s -e "CREATE DATABASE $SEAFILE_DB CHARACTER SET utf8;" sudo -u mysql mysql -s -e "CREATE DATABASE $SEAHUB_DB CHARACTER SET utf8;" @@ -189,28 +189,26 @@ sed -i "0,/127.0.0.1/s/127.0.0.1/0.0.0.0/" /opt/seafile/conf/gunicorn.conf.py msg_ok "Conf files adjusted" msg_info "Setting up Seafile" -$STD su - seafile -c "/opt/seafile/seafile-server-latest/seafile.sh start" +$STD su - seafile -c "bash /opt/seafile/seafile-server-latest/seafile.sh start" $STD su - seafile -c "expect <