1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/incus_ynh.git synced 2024-09-03 19:26:15 +02:00
incus_ynh/scripts/upgrade
2024-03-14 22:24:08 +01:00

44 lines
1.5 KiB
Bash

#!/bin/bash
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# ADD A CONFIGURATION
#=================================================
ynh_script_progression --message="First stopping $app service..."
ynh_systemd_action --service_name="$app" --action="start" --log_path="/var/log/incus/incusd.log"
#=================================================
# REAPPLY SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression --message="Upgrading system configurations related to $app..."
yunohost service add "$app" --description="Incus system container and virtual machine manager" --log="/var/log/incus/incusd.log"
# Use logrotate to manage application logfile(s)
ynh_use_logrotate --non-append
_ynh_add_dnsmasq_config
_ynh_remove_subuid_subgid
_ynh_add_subuid_subgid
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting $app's systemd service..."
# Start a systemd service
ynh_systemd_action --service_name="$app" --action="start" --log_path="/var/log/incus/incusd.log"
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Upgrade of $app completed" --last