From c35a2e75fc164c10e55e90d27a271ce6d7098ebb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Thu, 30 Jul 2020 22:55:35 +0200 Subject: [PATCH] Add a sleep after service start --- scripts/change_url | 1 + scripts/install | 1 + scripts/restore | 1 + scripts/upgrade | 1 + 4 files changed, 4 insertions(+) diff --git a/scripts/change_url b/scripts/change_url index 17b7a1e..ce0313d 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -46,5 +46,6 @@ ynh_script_progression --message="Reloading services..." sudo systemctl reload nginx.service ynh_systemd_action --service_name "uwsgi-app@$app.service" --action restart \ --line_match "WSGI app 0 \(mountpoint='$path_url'\) ready in [[:digit:]]* seconds on interpreter" --log_path "/var/log/uwsgi/$app/pgadmin.log" +sleep 10 ynh_script_progression --message="Change of URL completed for $app" --last diff --git a/scripts/install b/scripts/install index 54462aa..b775c7f 100644 --- a/scripts/install +++ b/scripts/install @@ -121,5 +121,6 @@ ynh_use_logrotate --logfile /var/log/pgadmin ynh_script_progression --message="Starting pgadmin services..." --weight=3 ynh_systemd_action --service_name "uwsgi-app@$app.service" \ --line_match "WSGI app 0 \(mountpoint='$path_url'\) ready in [[:digit:]]* seconds on interpreter" --log_path "/var/log/uwsgi/$app/pgadmin.log" +sleep 10 ynh_script_progression --message="Installation of $app completed" --last diff --git a/scripts/restore b/scripts/restore index 801dd92..6145bf3 100644 --- a/scripts/restore +++ b/scripts/restore @@ -76,5 +76,6 @@ ynh_script_progression --message="Starting pgadmin services..." --weight=3 ynh_systemd_action --service_name "uwsgi-app@$app.service" \ --line_match "WSGI app 0 \(mountpoint='$path_url'\) ready in [[:digit:]]* seconds on interpreter" --log_path "/var/log/uwsgi/$app/pgadmin.log" systemctl reload nginx +sleep 10 ynh_script_progression --message="Restoration completed for $app" --last diff --git a/scripts/upgrade b/scripts/upgrade index 98e5613..110f580 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -71,5 +71,6 @@ ynh_use_logrotate --logfile /var/log/pgadmin --nonappend ynh_script_progression --message="Restarting pgadmin services..." --weight=3 ynh_systemd_action --service_name "uwsgi-app@$app.service" \ --line_match "WSGI app 0 \(mountpoint='$path_url'\) ready in [[:digit:]]* seconds on interpreter" --log_path "/var/log/uwsgi/$app/pgadmin.log" +sleep 10 ynh_script_progression --message="Upgrade of $app completed" --last