diff --git a/scripts/install b/scripts/install index 47d6485..7cf8c48 100755 --- a/scripts/install +++ b/scripts/install @@ -94,6 +94,11 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Configuring a systemd service..." --weight=1 +# Create a dedicated systemd config +ynh_add_systemd_config --service="${app}" --template="${app}.service" +ynh_add_systemd_config --service="${app}_workers" --template="${app}_workers.service" + + mkdir /etc/systemd/system/${app}.service.d/ chown $app: /etc/systemd/system/${app}.service.d/ @@ -108,9 +113,8 @@ ynh_add_config --template="../conf/variables_fittrackee_workers.conf" --destinat chmod 600 /etc/systemd/system/${app}_workers.service.d/variables.conf chown $app: "/etc/systemd/system/${app}_workers.service.d/variables.conf" -# Create a dedicated systemd config -ynh_add_systemd_config --service="${app}" --template="${app}.service" -ynh_add_systemd_config --service="${app}_workers" --template="${app}_workers.service" + +systemctl daemon-reload #================================================= # GENERIC FINALIZATION @@ -131,7 +135,6 @@ ynh_script_progression --message="Starting systemd services..." --weight=15 ynh_systemd_action --service_name="${app}" --action="start" --log_path="/var/log/$app/$app.log" --line_match="Booting worker with pid" ynh_systemd_action --service_name="${app}_workers" --action="start" --log_path="systemd" --line_match="ready" -systemctl daemon-reload #================================================= # END OF SCRIPT #=================================================