diff --git a/scripts/install b/scripts/install index c8cf916..e574298 100644 --- a/scripts/install +++ b/scripts/install @@ -146,12 +146,19 @@ popd service redis-server start #================================================= -# Configure init script +# INTEGRATE SERVICE IN YUNOHOST #================================================= +ynh_script_progression --message="Integrating service in YunoHost..." --time --weight=1 -systemctl daemon-reload -systemctl enable "$app".service -systemctl start "$app".service +yunohost service add $app --description "A short description of the app" --log "/var/log/$app/$app.log" + +#================================================= +# START SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Starting a systemd service..." --time --weight=1 + +# Start a systemd service +ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" #================================================= # Set Public or private @@ -165,9 +172,14 @@ then fi #================================================= -# Reload Service +# RELOAD NGINX #================================================= +ynh_script_progression --message="Reloading NGINX web server..." --time --weight=1 ynh_systemd_action --service_name=nginx --action=reload -yunohost service add "$app" --log /var/log/"$app"/"$app".log -yunohost app ssowatconf + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_script_progression --message="Installation of $app completed" --time --last