From e95d3da991d40a0ad85ba91ad83b84a0c224b1de Mon Sep 17 00:00:00 2001 From: pks Date: Tue, 22 Nov 2022 22:05:29 +0100 Subject: 2022-11-22 --- config/systemd/weather-logger-receiver.service | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'config/systemd') diff --git a/config/systemd/weather-logger-receiver.service b/config/systemd/weather-logger-receiver.service index d771e59..4496fce 100644 --- a/config/systemd/weather-logger-receiver.service +++ b/config/systemd/weather-logger-receiver.service @@ -14,9 +14,12 @@ StandardOutput=syslog StandardError=syslog SyslogIdentifier=weather-logger-receiver PIDFile=/run/weather_logger/receiver.pid -ExecStart=/usr/local/src/weather_logger/weather-logger-receiver /etc/weather-logger-receiver.yaml +PermissionsStartOnly=true +ExecStartPre=mkdir -p /run/weather_logger /var/log/weather_logger /usr/local/share/weather_logger ExecStartPre=rm -f /run/weather_logger/receiver.pid +ExecStartPre=chown -R weather-logger:weather-logger /run/weather_logger /var/log/weather_logger /usr/local/share/weather_logger ExecStopPost=rm -f /run/weather_logger/receiver.pid +ExecStart=/usr/local/src/weather_logger/weather-logger-receiver /etc/weather-logger-receiver.yaml [Install] WantedBy=multi-user.target -- cgit v1.2.3