diff options
-rw-r--r-- | config/systemd/weather-logger-receiver.service | 5 | ||||
-rw-r--r-- | config/weather-logger-receiver.yaml | 2 | ||||
-rwxr-xr-x | scripts/install.sh (renamed from config/install) | 1 |
3 files changed, 6 insertions, 2 deletions
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 diff --git a/config/weather-logger-receiver.yaml b/config/weather-logger-receiver.yaml index e92c00e..c7080b0 100644 --- a/config/weather-logger-receiver.yaml +++ b/config/weather-logger-receiver.yaml @@ -6,7 +6,7 @@ pid_file_path: "/run/weather_logger/receiver.pid" locations: Berlin: - "f4:01": + "bc:01": handle: "inside" type: "THGR810, THGN800" "1f:01": diff --git a/config/install b/scripts/install.sh index 9891c58..6cdce59 100755 --- a/config/install +++ b/scripts/install.sh @@ -1,5 +1,6 @@ #!/bin/bash +pip install --prefix /usr/local -r config/requirements.txt sudo ln -s $(pwd)/weather-logger-receiver.yaml /etc/ sudo ln -s $(pwd)/systemd/weather-logger-receiver.service /etc/systemd/system/ sudo systemctl daemon-reload |