linux - systemd: 部署go程序的service文件

特米no

2018-06-01T10:23:56Z||2018-06-01T10:23:56Z

[Unit]
Description=app
ConditionPathExists=/user/go/bin/app

[Service]
Restart=always
RestartSec=3
EnvironmentFile=/etc/app/env.conf
ExecStart=/user/go/bin/app ${ARG1}
Group=user
User=user

[Install]
WantedBy=multi-user.target