mirror of
https://github.com/taigrr/godns
synced 2025-01-18 04:03:25 -08:00
add systemd config file
This commit is contained in:
parent
5f52bfb3f9
commit
0165b5d368
10
README.md
10
README.md
@ -54,6 +54,16 @@ nohup ./godns &
|
||||
sudo start godns
|
||||
```
|
||||
|
||||
## Run it as a daemon, manage it via Systemd
|
||||
|
||||
* Modify `./systemd/godns.service` and config it.
|
||||
* Copy `./systemd/godns.service` to `/lib/systemd/system`
|
||||
* Start it as a systemd service:
|
||||
|
||||
```bash
|
||||
sudo systemctl start godns
|
||||
```
|
||||
|
||||
## Run it in docker
|
||||
|
||||
Now godns supports to run in docker.
|
||||
|
12
systemd/godns.service
Normal file
12
systemd/godns.service
Normal file
@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=GoDNS Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/path/to/your/godns-dir/godns -c=/path/to/your/godns-dir/config.json
|
||||
Restart=always
|
||||
KillMode=process
|
||||
RestartSec=2s
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
x
Reference in New Issue
Block a user