Full app update

This commit is contained in:
Josué Tille 2017-08-09 15:34:10 +02:00
parent 9380ee33c1
commit 83b41602f7
5 changed files with 22 additions and 9 deletions

View file

@ -91,8 +91,8 @@ install_dependance() {
}
ynh_clean_setup () {
killall seafile-controller
killall seaf-server
killall ccnet-server
kill $(ps -C python2.7 -o pid,cmd | grep "python2.7 $final_path/seafile-server-$seafile_version/seahub/manage.py" | cut -d' ' -f1)
pkill -f seafile-controller
pkill -f seaf-server
pkill -f ccnet-server
pkill -f "seahub"
}

View file

@ -36,12 +36,10 @@ db_pwd=$(ynh_app_setting_get ${app} mysqlpwd)
ynh_backup $final_path
ynh_backup /home/yunohost.app/seafile-data "data" 1
ynh_backup /etc/nginx/conf.d/$domain.d/${APP}.conf
ynh_backup /etc/nginx/conf.d/$domain.d/${app}.conf
ynh_backup /etc/init.d/seafile-server
# Backup mysql
ynh_mysql_dump_db
ynh_mysql_dump_db ccnetdb > ${YNH_CWD}/ccnetdb.dmp
ynh_mysql_dump_db seafiledb > ${YNH_CWD}/seafiledb.dmp
ynh_mysql_dump_db seahubdb > ${YNH_CWD}/seahubdb.dmp

View file

@ -108,6 +108,9 @@ echo 'HOST = ldap://localhost:389' | tee -a $final_path/conf/ccnet.conf
echo 'BASE = ou=users,dc=yunohost,dc=org' | tee -a $final_path/conf/ccnet.conf
echo 'LOGIN_ATTR = mail' | tee -a $final_path/conf/ccnet.conf
# Enable manually wiki
echo 'ENABLE_WIKI = True' | tee -a $final_path/conf/seahub_settings.py
# Fix local warning
ynh_replace_string en_US.UTF-8 $LANG $final_path/seafile-server-$seafile_version/seahub.sh
@ -120,6 +123,7 @@ cp ../conf/seafile-server /etc/init.d
ynh_replace_string SEAHUB_PORT $seahub_port /etc/init.d/seafile-server
ynh_replace_string SEAFILE_DIR $final_path /etc/init.d/seafile-server
chmod +x /etc/init.d/seafile-server
systemctl daemon-reload
update-rc.d seafile-server defaults
# Config nginx
@ -162,4 +166,10 @@ yunohost service add seafile-server
# Restart seafile
su - $seafile_user -s /bin/bash -c "$final_path/seafile-server-latest/seahub.sh stop"
systemctl stop seafile-server.service
systemctl start seafile-server.service # || (sleep 2 && systemctl start seafile-server.service)
sleep 2
# We kill all process lunched by the script
pkill -f seafile-controller || true
pkill -f seaf-server || true
systemctl start seafile-server.service

View file

@ -69,5 +69,7 @@ yunohost service add seafile-server
# Reload nginx
systemctl reload nginx.service
# start seafile
# Enable service and start seafile
systemctl daemon-reload
update-rc.d seafile-server defaults
systemctl start seafile-server.service

View file

@ -69,6 +69,9 @@ case $installed_version in
# Update seafile by script
../conf/upgrade_6.1.exp $final_path/seafile-server-$seafile_version $root_pwd
# Enable manually wiki
echo 'ENABLE_WIKI = True' | tee -a $final_path/conf/seahub_settings.py
;&
esac