Merge pull request #82 from yalh76/services

Adding ynh_systemd_action
This commit is contained in:
Maniack Crudelis
2019-05-06 12:05:52 +02:00
committed by GitHub
5 changed files with 65 additions and 0 deletions

View File

@@ -90,6 +90,13 @@ path_url=$(ynh_normalize_url_path --path_url=$path_url)
#=================================================
# STANDARD UPGRADE STEPS
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Stopping a systemd service..." --time --weight=1
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
@@ -194,6 +201,13 @@ then
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
fi
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service..." --time --weight=1
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
#=================================================
# RELOAD NGINX
#=================================================