From 16e0f35be9631a4012abd2228f3186545a44ba57 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 13 Oct 2019 16:12:08 +0200 Subject: [PATCH 1/3] Add sleep --- scripts/backup | 1 + scripts/change_url | 1 + scripts/install | 1 + scripts/upgrade | 1 + 4 files changed, 4 insertions(+) diff --git a/scripts/backup b/scripts/backup index b348c17..eca0b42 100644 --- a/scripts/backup +++ b/scripts/backup @@ -83,6 +83,7 @@ ynh_backup --src_path="/etc/systemd/system/$app.service" ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Rocket has launched from" +sleep 60 #================================================= # END OF SCRIPT diff --git a/scripts/change_url b/scripts/change_url index a17aae3..e91dd79 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -97,6 +97,7 @@ fi ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Rocket has launched from" +sleep 60 #================================================= # RELOAD NGINX diff --git a/scripts/install b/scripts/install index c643ae5..1570803 100644 --- a/scripts/install +++ b/scripts/install @@ -198,6 +198,7 @@ ynh_script_progression --message="Starting a systemd service..." --weight=2 # Start a systemd service ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Rocket has launched from" +sleep 60 #================================================= # SETUP FAIL2BAN diff --git a/scripts/upgrade b/scripts/upgrade index b79c224..80f499b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -223,6 +223,7 @@ fi ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Rocket has launched from" +sleep 60 #================================================= # RELOAD NGINX From 10811f23ad17aa927b0da8c7e2db6de4459f731e Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 13 Oct 2019 16:19:50 +0200 Subject: [PATCH 2/3] Add sleep --- scripts/restore | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/restore b/scripts/restore index 6e10c7e..364319d 100644 --- a/scripts/restore +++ b/scripts/restore @@ -117,6 +117,7 @@ yunohost service add $app --description "$app daemon for Bitwarden" --log "/var/ ynh_script_progression --message="Starting a systemd service..." --weight=2 ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Rocket has launched from" +sleep 60 #================================================= # RESTORE THE LOGROTATE CONFIGURATION From d864af92020d36d27a3e23342df384d7b4f021ad Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 16 Oct 2019 00:19:52 +0200 Subject: [PATCH 3/3] limit sleep to package_check --- scripts/backup | 4 +++- scripts/change_url | 4 +++- scripts/install | 4 +++- scripts/restore | 4 +++- scripts/upgrade | 4 +++- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/scripts/backup b/scripts/backup index eca0b42..fa327c3 100644 --- a/scripts/backup +++ b/scripts/backup @@ -83,7 +83,9 @@ ynh_backup --src_path="/etc/systemd/system/$app.service" ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Rocket has launched from" -sleep 60 +if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then + sleep 60 +fi #================================================= # END OF SCRIPT diff --git a/scripts/change_url b/scripts/change_url index e91dd79..2ade288 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -97,7 +97,9 @@ fi ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Rocket has launched from" -sleep 60 +if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then + sleep 60 +fi #================================================= # RELOAD NGINX diff --git a/scripts/install b/scripts/install index 1570803..df72d69 100644 --- a/scripts/install +++ b/scripts/install @@ -198,7 +198,9 @@ ynh_script_progression --message="Starting a systemd service..." --weight=2 # Start a systemd service ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Rocket has launched from" -sleep 60 +if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then + sleep 60 +fi #================================================= # SETUP FAIL2BAN diff --git a/scripts/restore b/scripts/restore index 364319d..86c3993 100644 --- a/scripts/restore +++ b/scripts/restore @@ -117,7 +117,9 @@ yunohost service add $app --description "$app daemon for Bitwarden" --log "/var/ ynh_script_progression --message="Starting a systemd service..." --weight=2 ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Rocket has launched from" -sleep 60 +if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then + sleep 60 +fi #================================================= # RESTORE THE LOGROTATE CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 80f499b..e9b6aed 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -223,7 +223,9 @@ fi ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Rocket has launched from" -sleep 60 +if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then + sleep 60 +fi #================================================= # RELOAD NGINX