1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/diacamma_ynh.git synced 2024-09-03 18:26:10 +02:00
diacamma_ynh/scripts/upgrade
Laurent Gay fbb8c534c1 correct
2023-12-12 16:18:11 +01:00

52 lines
No EOL
1.5 KiB
Bash

#!/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"
#=================================================
# UPDATE DIACAMMA
#=================================================
ynh_script_progression --message="Updating Diacamma..."
pushd $install_dir
venv/bin/lucterios_admin.py check
venv/bin/lucterios_admin.py update
venv/bin/lucterios_admin.py refreshall
popd
refresh_collect
#=================================================
# REAPPLY SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression --message="Upgrading system configurations related to $app..."
ynh_add_nginx_config
ynh_add_systemd_config
yunohost service add $app --log="/var/log/$app/$app.log"
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