新增systemd service unit注册模板
This commit is contained in:
18
ServiceTemplate.unit
Normal file
18
ServiceTemplate.unit
Normal 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
|
||||
Reference in New Issue
Block a user