mirror of
https://github.com/YunoHost-Apps/diacamma_ynh.git
synced 2024-09-03 18:26:10 +02:00
47 lines
No EOL
1.3 KiB
Bash
47 lines
No EOL
1.3 KiB
Bash
#!/bin/bash
|
|
|
|
source _common.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
upgrade_type=$(ynh_check_app_version_changed)
|
|
|
|
#=================================================
|
|
# STOP SUPERVISOR SERVICE
|
|
#=================================================
|
|
ynh_script_progression --message="Stopping a supervisor service..."
|
|
|
|
supervisorctl stop ${app}
|
|
|
|
#=================================================
|
|
# UPDATE DIACAMMA
|
|
#=================================================
|
|
ynh_script_progression --message="Updating Diacamma..."
|
|
|
|
update_software
|
|
|
|
refresh_collect
|
|
|
|
#=================================================
|
|
# REAPPLY SYSTEM CONFIGURATIONS
|
|
#=================================================
|
|
ynh_script_progression --message="Upgrading system configurations related to $app..."
|
|
|
|
ynh_add_nginx_config
|
|
|
|
ynh_add_config --template="../conf/supervisor.conf" --destination="/etc/supervisor/conf.d/${app}.conf"
|
|
supervisorctl reread
|
|
|
|
ynh_use_logrotate --non-append
|
|
|
|
#=================================================
|
|
# START SUPERVISOR SERVICE
|
|
#=================================================
|
|
ynh_script_progression --message="Starting a supervisor service..."
|
|
|
|
supervisorctl start ${app}
|
|
|
|
#=================================================
|
|
# END OF SCRIPT
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Upgrade of $app completed" --last |