mirror of
https://github.com/YunoHost-Apps/watchdog_ynh.git
synced 2024-06-22 05:42:53 +02:00
Enhance service handling
This commit is contained in:
parent
7f91a8ad88
commit
5b604d52cf
3 changed files with 12 additions and 3 deletions
|
@ -44,7 +44,7 @@ ynh_script_progression --message="Starting app's systemd service..."
|
||||||
|
|
||||||
# Enable and start a systemd service
|
# Enable and start a systemd service
|
||||||
systemctl enable $app.service --quiet
|
systemctl enable $app.service --quiet
|
||||||
ynh_systemd_action --service_name=$app --action="start"
|
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
|
@ -21,6 +21,15 @@ systemctl enable $app.service --quiet
|
||||||
|
|
||||||
yunohost service add $app
|
yunohost service add $app
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# GENERIC FINALIZATION
|
||||||
|
#=================================================
|
||||||
|
# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Reloading $app's service..." --weight=1
|
||||||
|
|
||||||
|
ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -22,7 +22,7 @@ upgrade_type=$(ynh_check_app_version_changed)
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
||||||
|
|
||||||
ynh_systemd_action --service_name=$app --action="stop"
|
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REAPPLY SYSTEM CONFIGURATIONS
|
# REAPPLY SYSTEM CONFIGURATIONS
|
||||||
|
@ -48,7 +48,7 @@ chown root: "/etc/watchdog.conf"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Starting a systemd service..."
|
ynh_script_progression --message="Starting a systemd service..."
|
||||||
|
|
||||||
ynh_systemd_action --service_name=$app --action="start"
|
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
Loading…
Reference in a new issue