From a2a33781c64d41be272d5614d034b541f1cc1a92 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sun, 17 Jan 2021 23:07:35 +0100 Subject: [PATCH] Detect successful systemd actions --- scripts/change_url | 4 ++-- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 126010e..91ed67f 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -74,7 +74,7 @@ fi #================================================= 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" +ynh_systemd_action --service_name=$app --action="stop" --line_match="Stopped Dentrite Matrix homeserver" --log_path="systemd" #================================================= # MODIFY URL IN NGINX CONF @@ -118,7 +118,7 @@ fi #================================================= 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" +ynh_systemd_action --service_name=$app --action="start" --line_match="Started Dentrite Matrix homeserver" --log_path="systemd" #================================================= # RELOAD NGINX diff --git a/scripts/install b/scripts/install index 44b5c81..a6c3949 100644 --- a/scripts/install +++ b/scripts/install @@ -200,7 +200,7 @@ yunohost service add $app --description="Dendrite Matrix homeserver" --log="/var ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --line_match="Started Dentrite Matrix homeserver" --log_path="systemd" #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index a68fbe2..18f7a8b 100644 --- a/scripts/restore +++ b/scripts/restore @@ -128,7 +128,7 @@ yunohost service add $app --description="Dendrite Matrix homeserver" --log="/var #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --line_match="Started Dentrite Matrix homeserver" --log_path="systemd" #================================================= # RESTORE VARIOUS FILES diff --git a/scripts/upgrade b/scripts/upgrade index 0f1e2db..04196f4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -62,7 +62,7 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="stop" --line_match="Stopped Dentrite Matrix homeserver" --log_path="systemd" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -158,7 +158,7 @@ yunohost service add $app --description="Dendrite Matrix homeserver" --log="/var #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --line_match="Started Dentrite Matrix homeserver" --log_path="systemd" #================================================= # RELOAD NGINX