Browse Source

make scripts executable; give advice about config file permissions

master
lurchi 3 years ago
parent
commit
cf18d12767
  1. 10
      README.md
  2. 0
      homeserverdns-update
  3. 2
      homeserverdns.service

10
README.md

@ -21,7 +21,15 @@ sudo cp homeserverdns-daemon homeserverdns-update /usr/bin
sudo cp homeserverdns.cfg /etc
```
If we want to use systemd to control homeserverdns, we need to install the service file `homeserverdns.service`. We have to make sure that the path of the config file is correct in that file.
We create a user and adjust the permissions of the config file, so only that user can read it (and the credentials in it).
```shell
sudo useradd --system homeserverdns
sudo chown homeserverdns:root /etc/homeserverdns.cfg
sudo chown 0600 /etc/homeserverdns.cfg
```
If we want to use systemd to control homeserverdns, we need to install the service file `homeserverdns.service`. We have to make sure that the path of the config file and the `User` variable are correct in that file.
```shell
sudo cp homeserverdns.service /etc/systemd/system

0
homeserverdns-update

2
homeserverdns.service

@ -4,6 +4,6 @@ Description=DNS updater for home servers
[Service]
ExecStart=/usr/bin/env bash -c 'homeserverdns-daemon /etc/homeserverdns.cfg'
User=homeserverdns
Group=nobody
User=nobody
Type=simple

Loading…
Cancel
Save