diff options
author | pks <pks@pks.rocks> | 2021-05-11 07:25:58 +0200 |
---|---|---|
committer | pks <pks@pks.rocks> | 2021-05-11 07:25:58 +0200 |
commit | 2ecba7b3ca7f6bdff29c8693b3073e580bec21f7 (patch) | |
tree | 79a7c9f1d6a94651f5da851b155420ce5ff81b85 /config | |
parent | 97ee70aafa781d36b47611e609e031a9358488a0 (diff) |
improve install script
Diffstat (limited to 'config')
-rwxr-xr-x | config/install | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/config/install b/config/install index 0977113..1735300 100755 --- a/config/install +++ b/config/install @@ -2,10 +2,16 @@ sudo ln -s config/weather-logger-receiver.yaml /etc/ sudo ln -s config/systemd/weather-logger-receiver.service /etc/systemd/system/ +sudo systemctl daemon-reload sudo ln -s config/syslog/50weather-logger-receiver.conf /etc/rsyslog.d/ +sudo systemctl restart rsyslog sudo ln -s config/logrotate/weather-logger-receiver /etc/logrorate.d/ +sudo systemctl restart logrotate useradd -M -s /bin/bash -G dialout weather-logger -sudo mkdir -p /run/weather_logger/ /var/log/weather_logger/ -sudo chown weather-logger:weather-logger /run/weather_logger/ /var/log/weather_logger/ +for prefix in /run /var/log /usr/local/share; do + sudo mkdir -p $prefix/weather_logger + sudo chown -R weather-logger:weather-logger $prefix/weather_logger + sudo chmod -R 755 $prefix/weather_logger +done |