From fc5badaba6e80f6e6d00d31383c61f8fe4ac71bb Mon Sep 17 00:00:00 2001 From: Yalh Date: Tue, 29 Jan 2019 02:37:21 +0100 Subject: [PATCH] Start service earlier --- scripts/install | 4 ++-- scripts/restore | 2 +- scripts/upgrade | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 0d4b5d2..2545827 100644 --- a/scripts/install +++ b/scripts/install @@ -208,6 +208,7 @@ ynh_replace_string "res.writeHead(200)" "res.writeHead(200, {\"content-type\": \ # Create a dedicated systemd config ynh_replace_string "__ENV_PATH__" "$PATH" "../conf/systemd.service" ynh_add_systemd_config +systemctl start $app #================================================= # SETUP APPLICATION WITH CURL @@ -315,5 +316,4 @@ fi # RELOAD NGINX #================================================= -systemctl reload nginx -systemctl start $app \ No newline at end of file +systemctl reload nginx \ No newline at end of file diff --git a/scripts/restore b/scripts/restore index 900ffb0..204d8a7 100644 --- a/scripts/restore +++ b/scripts/restore @@ -105,6 +105,7 @@ npm install -g ts-node ynh_restore_file "/etc/systemd/system/$app.service" systemctl enable $app.service +systemctl start $app #================================================= # ADVERTISE SERVICE IN ADMIN PANEL @@ -132,4 +133,3 @@ ynh_restore_file "/etc/logrotate.d/$app" #systemctl reload php5-fpm systemctl reload nginx -systemctl start $app diff --git a/scripts/upgrade b/scripts/upgrade index 95a1404..1c6b832 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -136,6 +136,7 @@ ynh_use_logrotate --non-append # Create a dedicated systemd config ynh_add_systemd_config +systemctl start $app #================================================= # GENERIC FINALIZATION @@ -166,4 +167,3 @@ fi #================================================= systemctl reload nginx -systemctl start $app