2018-04-13 21:20:12 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
ynh_backup_before_upgrade
|
|
|
|
ynh_clean_setup () {
|
|
|
|
ynh_restore_upgradebackup
|
|
|
|
}
|
|
|
|
ynh_abort_if_errors
|
|
|
|
|
2018-04-13 21:27:52 +02:00
|
|
|
#save database qnd config before replace all files
|
2018-04-13 21:20:12 +02:00
|
|
|
sudo -i -u postgres
|
|
|
|
pg_dumpall > noalyss_backup.dmp
|
|
|
|
sudo cp -a noalyss/include/config.inc.php etc/tmp/
|
|
|
|
|
2018-04-13 21:27:52 +02:00
|
|
|
|
2018-04-13 21:20:12 +02:00
|
|
|
#=================================================
|
|
|
|
# RELOAD NGINX
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
systemctl reload nginx
|