Improve service management with systemd helper

This commit is contained in:
Josué Tille 2019-09-10 22:51:15 +02:00
parent bdcf138aff
commit a268d78454
No known key found for this signature in database
GPG key ID: 716A6C99B04194EF
4 changed files with 12 additions and 10 deletions

View file

@ -157,7 +157,8 @@ sleep 2
# Reload services
ynh_script_progression --message="Starting services..."
ynh_systemd_action --service_name seafile
ynh_systemd_action --service_name seahub
ynh_systemd_action --service_name seafile -l "spawned seaf-server, pid " -p /var/log/seafile/controller.log
ynh_systemd_action --service_name seahub -l "Started Seafile hub." -p "systemd"
sleep 2
ynh_script_progression --message="Change of URL completed for $app" --time --last

View file

@ -223,8 +223,8 @@ pkill -f seaf-server || true
# Start service
ynh_script_progression --message="Starting seafile services..." --weight=3
ynh_systemd_action --service_name seafile
ynh_systemd_action --service_name seahub
sleep 5
ynh_systemd_action --service_name seafile -l "spawned seaf-server, pid " -p /var/log/seafile/controller.log
ynh_systemd_action --service_name seahub -l "Started Seafile hub." -p "systemd"
sleep 2
ynh_script_progression --message="Installation of $app completed" --last

View file

@ -94,8 +94,8 @@ sleep 5
# Restart service
ynh_script_progression --message="Starting seafile services..." --weight=3
ynh_systemd_action --service_name seafile
ynh_systemd_action --service_name seahub
sleep 5
ynh_systemd_action --service_name seafile -l "spawned seaf-server, pid " -p /var/log/seafile/controller.log
ynh_systemd_action --service_name seahub -l "Started Seafile hub." -p "systemd"
sleep 2
ynh_script_progression --message="Restoration completed for $app" --last

View file

@ -244,8 +244,9 @@ ynh_secure_remove --file=/tmp/seahub_cache
# restart seafile server
ynh_script_progression --message="Starting seafile services..." --weight=3
sleep 5
ynh_systemd_action --service_name seafile
ynh_systemd_action --service_name seahub
ynh_systemd_action --service_name seafile -l "spawned seaf-server, pid " -p /var/log/seafile/controller.log
ynh_systemd_action --service_name seahub -l "Started Seafile hub." -p "systemd"
sleep 2
# remove old version files
ynh_script_progression --message="Cleaning system and updating settings..."