更新systemd.service示例
This commit is contained in:
committed by
cloud-init created default user
parent
1ffa3da357
commit
170ea1e86a
@@ -25,10 +25,12 @@ Assert=i.target
|
||||
[Service]
|
||||
## 当前 Service 的类型,可选值:simple:启动主进程(默认);forking:启动子进程;oneshot:一次性进程;dbus:D-Bus进程;notify:当前Service启动后会通知Systemd;idle:当其他任务执行完毕后,当前Service才会启动
|
||||
Type=forking
|
||||
## 启动 Service 的命令
|
||||
ExecStart=
|
||||
## 指定环境变量
|
||||
Environment=
|
||||
## 启动当前 Service 之前执行的命令
|
||||
ExecStartPre=
|
||||
## 启动 Service 的命令
|
||||
ExecStart=
|
||||
## 启动当前 Service 之后执行的命令
|
||||
ExecStartPost=
|
||||
## 重启当前 Service 的命令
|
||||
@@ -43,8 +45,6 @@ RestartSec=
|
||||
Restart=
|
||||
## 停止当前 Service 之前等待的秒数
|
||||
TimeoutSec=
|
||||
## 指定环境变量
|
||||
Environment=
|
||||
|
||||
# 定义如何启动,以及是否开机启动
|
||||
[Install]
|
||||
|
||||
Reference in New Issue
Block a user