From 4ed142d8d89793904f53a7b4ad55a6ce43613d47 Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Wed, 15 Mar 2023 20:38:52 +0100 Subject: [PATCH] Make PID and save logs --- templates/checker.init.j2 | 2 +- templates/clean-wg.init.j2 | 2 +- templates/token-validator.init.j2 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/checker.init.j2 b/templates/checker.init.j2 index 7ba2657..28e062a 100644 --- a/templates/checker.init.j2 +++ b/templates/checker.init.j2 @@ -3,5 +3,5 @@ description="Maatma interface, API and more" command="/usr/sbin/checker" command_args="-dsn '{{ mysql_maatma.username }}:{{ mysql_maatma.password }}@tcp({{ mysql_endpoint.host }}:{{ mysql_endpoint.port}})/{{ mysql_maatma.database }}'" -start_stop_daemon_args="--background --quiet" +start_stop_daemon_args="--make-pidfile --background --quiet --stdout /var/log/checker.log --stderr /var/log/checker.log" pidfile="/var/run/$SVCNAME.pid" \ No newline at end of file diff --git a/templates/clean-wg.init.j2 b/templates/clean-wg.init.j2 index 014e68a..6a4f1f1 100644 --- a/templates/clean-wg.init.j2 +++ b/templates/clean-wg.init.j2 @@ -2,5 +2,5 @@ description="Maatma interface, API and more" command="/usr/sbin/clean-wg.sh" -start_stop_daemon_args="--background --quiet" +start_stop_daemon_args="--make-pidfile --background --quiet" pidfile="/var/run/$SVCNAME.pid" \ No newline at end of file diff --git a/templates/token-validator.init.j2 b/templates/token-validator.init.j2 index cd9e5f7..5d79ead 100644 --- a/templates/token-validator.init.j2 +++ b/templates/token-validator.init.j2 @@ -3,5 +3,5 @@ description="Maatma interface, API and more" command="/usr/sbin/token-validator" command_args="-baseurl /maatma/ -dsn '{{ mysql_maatma.username }}:{{ mysql_maatma.password }}@tcp({{ mysql_endpoint.host }}:{{ mysql_endpoint.port}})/{{ mysql_maatma.database }}' -oidc-clientid {{ oidc.clientid }} -oidc-secret {{ oidc.client_secret }}" -start_stop_daemon_args="--background --quiet" +start_stop_daemon_args="--make-pidfile --background --quiet --stdout /var/log/token-validator.log --stderr /var/log/token-validator.log" pidfile="/var/run/$SVCNAME.pid" \ No newline at end of file