chore: update systemd readme
This commit is contained in:
17
README.md
17
README.md
@@ -8,4 +8,21 @@
|
|||||||
* Service
|
* Service
|
||||||
* https://bitbucket.org/hatterjiang/linux-service-sample/src/master/
|
* https://bitbucket.org/hatterjiang/linux-service-sample/src/master/
|
||||||
* https://stackoverflow.com/questions/61443052/rust-daemon-best-practices
|
* https://stackoverflow.com/questions/61443052/rust-daemon-best-practices
|
||||||
|
* https://wiki.archlinux.org/index.php/systemd
|
||||||
|
|
||||||
|
|
||||||
|
Sample of aliyun service:
|
||||||
|
```shell
|
||||||
|
# cat /etc/systemd/system/aliyun.service
|
||||||
|
[Unit]
|
||||||
|
Description=aliyun-assist
|
||||||
|
After=network-online.target
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/sbin/aliyun-service
|
||||||
|
KillMode=process
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=1min
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user