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)
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# STOP SYSTEMD SERVICE
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Stopping a systemd service..."
|
|
|
|
|
|
|
|
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
|
|
|
|
|
|
|
|
#=================================================
|
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
|
|
|
|
2023-12-12 11:38:41 +01:00
|
|
|
pushd $install_dir
|
2023-12-12 13:07:45 +01:00
|
|
|
venv/bin/lucterios_admin.py check
|
|
|
|
venv/bin/lucterios_admin.py update
|
|
|
|
venv/bin/lucterios_admin.py refreshall
|
|
|
|
popd
|
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
|
|
|
|
|
|
|
|
ynh_add_systemd_config
|
|
|
|
|
2023-12-15 16:58:51 +01:00
|
|
|
yunohost service add ${app} --log="/var/log/${app}/${app}.log"
|
2023-12-11 17:56:26 +01:00
|
|
|
|
|
|
|
ynh_use_logrotate --non-append
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# START SYSTEMD SERVICE
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Starting a systemd service..."
|
|
|
|
|
|
|
|
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
ynh_script_progression --message="Upgrade of $app completed" --last
|