mirror of
https://github.com/YGGverse/aquatic-crawler.git
synced 2026-04-02 10:05:30 +00:00
Created Systemd (markdown)
parent
7ab1dbcb18
commit
b987b0c3b6
1 changed files with 34 additions and 0 deletions
34
Systemd.md
Normal file
34
Systemd.md
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
Run `aquatic-crawler` as `systemd` service.
|
||||||
|
|
||||||
|
## System user
|
||||||
|
|
||||||
|
To prevent permission issues, it is recommended to run the crawler under the same user as the [aquatic](https://github.com/greatest-ape/aquatic) service. Alternatively, you can change the group permissions and replace the `User` and `Group` below with your own values.
|
||||||
|
|
||||||
|
## Service configuration
|
||||||
|
|
||||||
|
Create new file `/etc/systemd/system/aquatic-crawler.service` with following settings:
|
||||||
|
|
||||||
|
``` snac.service
|
||||||
|
[Unit]
|
||||||
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=aquatic
|
||||||
|
Group=aquatic
|
||||||
|
ExecStartPre=/bin/sleep 10
|
||||||
|
ExecStart=/usr/local/bin/aquatic-crawler --infohash=/path/to/ipv6hash.bin --infohash=/path/to/ipv4hash.bin --tracker=udp://host1:port --export-rss=/path/to/rss.xml --export-trackers --enable-tcp
|
||||||
|
StandardOutput=file:/home/aquatic/crawler-debug.log
|
||||||
|
StandardError=file:/home/aquatic/crawler-error.log
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
```
|
||||||
|
* to disable errors output, set `StandardError` as `null`
|
||||||
|
|
||||||
|
### Manage
|
||||||
|
|
||||||
|
* `sudo systemctl daemon-reload` - apply new configuration
|
||||||
|
* `sudo systemctl enable aquatic-crawler` - autostart on system startup
|
||||||
|
* `sudo systemctl restart aquatic-crawler` - start the service
|
||||||
Loading…
Add table
Add a link
Reference in a new issue