mirror of
https://github.com/bakito/adguardhome-sync.git
synced 2024-11-10 09:12:29 +08:00
docs: add "Run as Linux Service via Systemd" to README (#359)
* docs: add "Run as Linux Service via Systemd" to README * fix: update config file anchor * chore: add a section on testing details * fix: web ui url
This commit is contained in:
parent
5f7e6e69e3
commit
1fffb80066
1 changed files with 43 additions and 0 deletions
43
README.md
43
README.md
|
@ -74,6 +74,49 @@ adguardhome-sync run
|
|||
adguardhome-sync run --cron "0 */2 * * *"
|
||||
```
|
||||
|
||||
### Run as Linux Service via Systemd
|
||||
|
||||
> Verified on Ubuntu Linux 24.04
|
||||
|
||||
Assume you have downloaded the the `adguardhome-sync` binary to `/opt/adguardhome-sync`.
|
||||
|
||||
Create systemd service file `/opt/adguardhome-sync/adguardhome-sync.service`:
|
||||
|
||||
```
|
||||
[Unit]
|
||||
Description = AdGuardHome Sync
|
||||
After = network.target
|
||||
|
||||
[Service]
|
||||
ExecStart = /opt/adguardhome-sync/adguardhome-sync --config /opt/adguardhome-sync/adguardhome-sync.yaml run
|
||||
|
||||
[Install]
|
||||
WantedBy = multi-user.target
|
||||
|
||||
```
|
||||
|
||||
Create a configuration file `/opt/adguardhome-sync/adguardhome-sync.yaml`, please follow [Config file](#config-file-1) section below for details.
|
||||
|
||||
Install and enable service:
|
||||
|
||||
```bash
|
||||
sudo cp /opt/adguardhome-sync/adguardhome-sync.service /etc/systemd/system/
|
||||
|
||||
sudo systemctl enable adguardhome-sync.service
|
||||
|
||||
sudo systemctl start adguardhome-sync.service
|
||||
|
||||
```
|
||||
|
||||
Then you can check the status:
|
||||
|
||||
```bash
|
||||
sudo systemctl status adguardhome-sync.service
|
||||
|
||||
```
|
||||
|
||||
If web UI has been enabled in configuration (default port is 8080), can also check the status via `http://<server-IP>:8080`
|
||||
|
||||
## Run Windows
|
||||
|
||||
```bash
|
||||
|
|
Loading…
Reference in a new issue