diff --git a/conf/django-for-runners.service b/conf/systemd.service similarity index 86% rename from conf/django-for-runners.service rename to conf/systemd.service index 0fda214..6b6cc92 100644 --- a/conf/django-for-runners.service +++ b/conf/systemd.service @@ -1,5 +1,5 @@ [Unit] -Description=django-for-runners application server +Description=__APP__ server After=redis.service postgresql.service [Service] diff --git a/scripts/change_url b/scripts/change_url index af89821..8a037d3 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -73,7 +73,7 @@ fi #================================================= # STOP SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Stopping systemd services..." +ynh_script_progression --message="Stopping systemd service '$app'..." ynh_systemd_action --service_name="$app" --action="stop" @@ -142,7 +142,7 @@ ynh_store_file_checksum --file="$settings" #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting systemd services..." --weight=5 +ynh_script_progression --message="Starting systemd service '$app'..." --weight=5 ynh_systemd_action --service_name="$app" --action="start" diff --git a/scripts/install b/scripts/install index bbf0293..6f5c2d4 100755 --- a/scripts/install +++ b/scripts/install @@ -227,10 +227,11 @@ chmod o-rwx "$final_path" #================================================= # SETUP SYSTEMD #================================================= -ynh_script_progression --message="Configuring a systemd service..." +ynh_script_progression --message="Configuring systemd service '$app'..." --weight=5 -# https://github.com/YunoHost/yunohost/blob/dev/data/helpers.d/systemd -ynh_add_systemd_config --service="$app" --template="django-for-runners.service" +# https://yunohost.org/en/contribute/packaging_apps/helpers +# https://github.com/YunoHost/yunohost/blob/dev/helpers/systemd +ynh_add_systemd_config --service="$app" --template="systemd.service" #================================================= # Start for_runners via systemd diff --git a/scripts/remove b/scripts/remove index 5e630a4..dc573b8 100755 --- a/scripts/remove +++ b/scripts/remove @@ -36,7 +36,7 @@ fi #================================================= # STOP PYINVENTORY'S SERVICES #================================================= -ynh_script_progression --message="Stopping and removing systemd services..." --weight=5 +ynh_script_progression --message="Stopping and removing systemd service '$app'..." --weight=5 ynh_remove_systemd_config --service="$app" diff --git a/scripts/restore b/scripts/restore index 6d47c8a..5460ea0 100755 --- a/scripts/restore +++ b/scripts/restore @@ -164,7 +164,7 @@ chmod o-rwx "$final_path" #================================================= # START PYINVENTORY #================================================= -ynh_script_progression --message="Starting a systemd service..." --weight=5 +ynh_script_progression --message="Starting systemd service '$app'..." --weight=5 ynh_systemd_action --service_name="$app" --action="start" diff --git a/scripts/upgrade b/scripts/upgrade index 3c852ae..98f46e4 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -49,7 +49,7 @@ ynh_abort_if_errors #================================================= # STOP SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Stopping systemd services..." --weight=5 +ynh_script_progression --message="Stopping systemd service '$app'..." --weight=5 ynh_systemd_action --service_name="$app" --action="stop" @@ -220,9 +220,9 @@ chmod o-rwx "$public_path" chmod o-rwx "$final_path" #================================================= -# Start for_runners via systemd +# Start the app server via systemd #================================================= -ynh_script_progression --message="Starting project services..." --weight=5 +ynh_script_progression --message="Starting systemd service '$app'..." --weight=5 ynh_systemd_action --service_name="$app" --action="start"