新增systemd service unit注册模板

This commit is contained in:
wuxiangkai
2023-12-22 21:48:50 +08:00
parent 7d460c2697
commit 4ae2c2bde8

18
ServiceTemplate.unit Normal file
View File

@@ -0,0 +1,18 @@
[Unit]
Description=Example Service
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
User=serviceuser
ExecStartPre=
ExecStart=/path/to/executable [options]
ExecStartPost=
ExecStop=
ExecReload=
[Install]
WantedBy=multi-user.target