make scripts executable; give advice about config file permissions
This commit is contained in:
parent
117008f41f
commit
cf18d12767
10
README.md
10
README.md
|
@ -21,7 +21,15 @@ sudo cp homeserverdns-daemon homeserverdns-update /usr/bin
|
||||||
sudo cp homeserverdns.cfg /etc
|
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
|
```shell
|
||||||
sudo cp homeserverdns.service /etc/systemd/system
|
sudo cp homeserverdns.service /etc/systemd/system
|
||||||
|
|
|
@ -4,6 +4,6 @@ Description=DNS updater for home servers
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/bin/env bash -c 'homeserverdns-daemon /etc/homeserverdns.cfg'
|
ExecStart=/usr/bin/env bash -c 'homeserverdns-daemon /etc/homeserverdns.cfg'
|
||||||
|
User=homeserverdns
|
||||||
Group=nobody
|
Group=nobody
|
||||||
User=nobody
|
|
||||||
Type=simple
|
Type=simple
|
||||||
|
|
Loading…
Reference in New Issue