mirror of
https://github.com/YunoHost-Apps/incus_ynh.git
synced 2024-09-03 19:26:15 +02:00
42 lines
1.5 KiB
Bash
42 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 the service..."
|
|
|
|
ynh_systemd_action --service_name="$app" --action="start" --log_path="/var/log/incus/incusd.log"
|
|
|
|
#=================================================
|
|
# SYSTEM CONFIGURATION
|
|
#=================================================
|
|
ynh_script_progression --message="Adding 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 --logfile="/var/log/incus/incusd.log"
|
|
|
|
_ynh_add_dnsmasq_config
|
|
|
|
_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="Installation of $app completed" --last
|