2023-12-11 17:56:26 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
upgrade_type=$(ynh_check_app_version_changed)
|
|
|
|
|
|
|
|
#=================================================
|
2023-12-17 18:45:44 +01:00
|
|
|
# STOP SUPERVISOR SERVICE
|
2023-12-11 17:56:26 +01:00
|
|
|
#=================================================
|
2023-12-17 18:45:44 +01:00
|
|
|
ynh_script_progression --message="Stopping a supervisor service..."
|
2023-12-11 17:56:26 +01:00
|
|
|
|
2023-12-17 18:45:44 +01:00
|
|
|
supervisorctl stop ${app}
|
2023-12-11 17:56:26 +01:00
|
|
|
|
|
|
|
#=================================================
|
2023-12-12 11:38:41 +01:00
|
|
|
# UPDATE DIACAMMA
|
2023-12-11 17:56:26 +01:00
|
|
|
#=================================================
|
2023-12-12 11:38:41 +01:00
|
|
|
ynh_script_progression --message="Updating Diacamma..."
|
2023-12-11 17:56:26 +01:00
|
|
|
|
2024-07-26 11:07:09 +02:00
|
|
|
update_software
|
2023-12-11 17:56:26 +01:00
|
|
|
|
2023-12-12 11:38:41 +01:00
|
|
|
refresh_collect
|
2023-12-11 17:56:26 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# REAPPLY SYSTEM CONFIGURATIONS
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Upgrading system configurations related to $app..."
|
|
|
|
|
|
|
|
ynh_add_nginx_config
|
|
|
|
|
2023-12-17 18:45:44 +01:00
|
|
|
ynh_add_config --template="../conf/supervisor.conf" --destination="/etc/supervisor/conf.d/${app}.conf"
|
|
|
|
supervisorctl reread
|
2023-12-11 17:56:26 +01:00
|
|
|
|
|
|
|
ynh_use_logrotate --non-append
|
|
|
|
|
|
|
|
#=================================================
|
2023-12-17 18:45:44 +01:00
|
|
|
# START SUPERVISOR SERVICE
|
2023-12-11 17:56:26 +01:00
|
|
|
#=================================================
|
2023-12-17 18:45:44 +01:00
|
|
|
ynh_script_progression --message="Starting a supervisor service..."
|
2023-12-11 17:56:26 +01:00
|
|
|
|
2023-12-17 18:45:44 +01:00
|
|
|
supervisorctl start ${app}
|
2023-12-11 17:56:26 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
ynh_script_progression --message="Upgrade of $app completed" --last
|