From cd4eaca378643e3fae9cc9fcf2119cae6ba97d74 Mon Sep 17 00:00:00 2001 From: pks Date: Mon, 10 May 2021 13:26:26 +0200 Subject: proper daemon --- config/systemd/weather-logger-receiver.service | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 config/systemd/weather-logger-receiver.service (limited to 'config/systemd/weather-logger-receiver.service') diff --git a/config/systemd/weather-logger-receiver.service b/config/systemd/weather-logger-receiver.service new file mode 100644 index 0000000..f56c915 --- /dev/null +++ b/config/systemd/weather-logger-receiver.service @@ -0,0 +1,22 @@ +[Unit] +Description=weather-logger-receiver +After=network.target +StartLimitIntervalSec=0 + +[Service] +Type=simple +Restart=always +RestartSec=1 +User=pks +Group=pks +Environment=PYTHONUNBUFFERED=1 +StandardOutput=syslog +StandardError=syslog +SyslogIdentifier=weather-logger-receiver +PIDFile=/run/weather_logger/receiver.pid +ExecStart=/usr/local/src/weather_logger/weather-logger-receiver Berlin +ExecStartPre=rm -f /run/weather_logger/receiver.pid +ExecStopPost=rm -f /run/weather_logger/receiver.pid + +[Install] +WantedBy=multi-user.target -- cgit v1.2.3