summaryrefslogtreecommitdiff
path: root/config/install
blob: c161c8d21c49771903154a94ac4090d698cc3a6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/bash

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/logrotate.d/
sudo systemctl restart logrotate

useradd -M -s /bin/bash -G dialout 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