From 0c57179bdaa7c6a5580c87f2812a26a5dddf9e9a Mon Sep 17 00:00:00 2001 From: Hatter Jiang Date: Wed, 7 Oct 2020 01:59:30 +0800 Subject: [PATCH] chore: update systemd readme --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index dff01a2..5ee500c 100644 --- a/README.md +++ b/README.md @@ -8,4 +8,21 @@ * Service * https://bitbucket.org/hatterjiang/linux-service-sample/src/master/ * 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 +```