diff --git a/seafile-server-7.1-ubuntu-amd64-http b/seafile-server-7.1-ubuntu-amd64-http index 67b0b64..c871110 100644 --- a/seafile-server-7.1-ubuntu-amd64-http +++ b/seafile-server-7.1-ubuntu-amd64-http @@ -153,6 +153,10 @@ apt-get install -y python3 python3-setuptools python3-pip python3-ldap memcached pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy psd-tools \ django-pylibmc django-simple-captcha + +service memcached start + + rm /etc/nginx/sites-enabled/* cat > /etc/nginx/sites-available/seafile.conf << EOF @@ -225,8 +229,7 @@ then SQLROOTPW=`sed -n 's/password=//p' /root/.my.cnf` else DEBIAN_FRONTEND=noninteractive apt-get install -y mariadb-server - systemctl start mariadb - systemctl enable mariadb + service mysql start SQLROOTPW=$(pwgen) @@ -416,13 +419,15 @@ eval "sed -i 's/= ask_admin_password()/= \"${SEAFILE_ADMIN_PW}\"/' ${INSTALLPATH # ------------------------------------------- # Start and stop Seafile eco system. This generates the initial admin user. # ------------------------------------------- -${INSTALLPATH}/seafile.sh start -${INSTALLPATH}/seahub.sh start -wait # sleep for a while, otherwise seahub will not be stopped -${INSTALLPATH}/seahub.sh stop -sleep 1 -${INSTALLPATH}/seafile.sh stop +chown ${SEAFILE_SERVER_USER}:${SEAFILE_SERVER_USER} -R ${SEAFILE_SERVER_HOME} +su - seafile -c "${INSTALLPATH}/seafile.sh start" +su - seafile -c "${INSTALLPATH}/seahub.sh start" +wait # sleep for a while, otherwise seahub will not be stopped +su - seafile -c "${INSTALLPATH}/seahub.sh stop" +sleep 1 +su - seafile -c "${INSTALLPATH}/seafile.sh stop" +sleep 1 # ------------------------------------------- # Restore original check_init_admin.py @@ -434,6 +439,12 @@ if is_pro; then $PYTHON ${PRO_PY} setup --mysql --mysql_host=127.0.0.1 --mysql_port=3306 --mysql_user=seafile --mysql_password=${SQLSEAFILEPW} --mysql_db=seahub_db fi +# kill all process +sleep 1 +pkill -9 -u seafile +sleep 1 + + # ------------------------------------------- # Fix permissions # -------------------------------------------