小编Nin*_*MAN的帖子

终端关闭时 Systemd 关闭

我的 systemd 服务文件的名称为os.service并具有以下配置行。

#  This systemd service file will help supervise os service
[Unit]
Description=Os Server
After= network.target

[Service]

# Preferably configure a non-privileged user
# User=deploy
# Group=deploy

# Environment variables shared across the config
#EnvironmentFile=  # environment file to be used, includes RACK_ENV
EnvironmentFile=/home/deploy/test/shared/.env
SyslogIdentifier=test
PIDFile=/home/deploy/test/shared/tmp/server.pid

# Specify the path to your test application root
# WorkingDirectory=/home/deploy/test/

# Start/Reload/Stop syntax
ExecStart=/home/deploy/test/current

# TimeoutSec=15
# TimeoutStopSec=10
RestartSec=5s           

# Restart os, always if it dies for some reason …
Run Code Online (Sandbox Code Playgroud)

ubuntu systemd

2
推荐指数
1
解决办法
1553
查看次数

标签 统计

systemd ×1

ubuntu ×1