22 lines
601 B
Desktop File
22 lines
601 B
Desktop File
[Unit]
|
|
Description=past-go backend service
|
|
After=network.target mysql.service
|
|
Wants=mysql.service
|
|
|
|
[Service]
|
|
Type=simple
|
|
# 运行用户:宝塔默认站点用户为 www,需对该用户有 data_dir/uploads 写权限
|
|
User=www
|
|
Group=www
|
|
# 改为你实际上传二进制与 config.yaml 的目录
|
|
WorkingDirectory=/www/wwwroot/past
|
|
ExecStart=/www/wwwroot/past/past-server -config /www/wwwroot/past/config.yaml
|
|
Restart=always
|
|
RestartSec=3
|
|
# 标准输出/错误会进 journalctl;程序自身也会写 data/go-server.log
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|