From 44e06a15403bced3f41a1ece7dab6908824e9983 Mon Sep 17 00:00:00 2001 From: Fabian Wilkens Date: Sun, 24 Jan 2021 22:04:27 +0100 Subject: [PATCH] Check if service is ready --- scripts/change_url | 2 +- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 515f083..2656f17 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -136,7 +136,7 @@ ynh_add_fail2ban_config --use_template --others_var="\ ynh_script_progression --message="Starting a systemd service..." --weight=2 ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" -sleep 15 +curl --silent --insecure --resolve $domain:443:127.0.0.1 https://$domain$path_url/ -o /dev/null --write-out "%{http_code}" --retry 10 --retry-delay 3 #================================================= # RELOAD NGINX diff --git a/scripts/install b/scripts/install index a65509f..2c1ccbf 100755 --- a/scripts/install +++ b/scripts/install @@ -232,7 +232,7 @@ 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" -sleep 15 +curl --silent --insecure --resolve $domain:443:127.0.0.1 https://$domain$path_url/ -o /dev/null --write-out "%{http_code}" --retry 10 --retry-delay 3 #================================================= # RELOAD NGINX diff --git a/scripts/restore b/scripts/restore index 62997c3..1f0f64f 100755 --- a/scripts/restore +++ b/scripts/restore @@ -130,7 +130,7 @@ yunohost service add $app --description "Standard Notes - Syncing Server" --log 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" -sleep 15 +curl --silent --insecure --resolve $domain:443:127.0.0.1 https://$domain$path_url/ -o /dev/null --write-out "%{http_code}" --retry 10 --retry-delay 3 #================================================= # RESTORE THE LOGROTATE CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 549cb13..a50e730 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -266,7 +266,7 @@ 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" -sleep 15 +curl --silent --insecure --resolve $domain:443:127.0.0.1 https://$domain$path_url/ -o /dev/null --write-out "%{http_code}" --retry 10 --retry-delay 3 #================================================= # RELOAD NGINX