summaryrefslogtreecommitdiff
path: root/config/systemd/weather-logger-receiver.service
diff options
context:
space:
mode:
authorpks <pks@pks.rocks>2021-05-10 13:26:26 +0200
committerpks <pks@pks.rocks>2021-05-10 13:26:26 +0200
commitcd4eaca378643e3fae9cc9fcf2119cae6ba97d74 (patch)
treeb99be6645feb4161f1cfd21c5efd097aa42cbbb7 /config/systemd/weather-logger-receiver.service
parent281fa36a24f81d87543a7791252954414e161565 (diff)
proper daemon
Diffstat (limited to 'config/systemd/weather-logger-receiver.service')
-rw-r--r--config/systemd/weather-logger-receiver.service22
1 files changed, 22 insertions, 0 deletions
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