mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-08-08 14:04:16 +08:00
添加 deploy 部署脚本
优化应用易用性
This commit is contained in:
24
deploy/anylink.service
Normal file
24
deploy/anylink.service
Normal file
@@ -0,0 +1,24 @@
|
||||
[Unit]
|
||||
Description=AnyLink Server Service
|
||||
Documentation=https://github.com/bjdgyc/anylink
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/usr/local/anylink-deploy
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
ExecStart=/usr/local/anylink-deploy/anylink --conf=/usr/local/anylink-deploy/conf/server.toml
|
||||
|
||||
# systemctl --version
|
||||
|
||||
# systemd older than v236
|
||||
# ExecStart=/bin/bash -c 'exec /usr/local/anylink-deploy/anylink --conf=/usr/local/anylink-deploy/conf/server.toml >> /usr/local/anylink-deploy/log/anylink.log 2>&1'
|
||||
|
||||
# systemd new than v236
|
||||
# StandardOutput=file:/usr/local/anylink-deploy/log/anylink-systemd.log
|
||||
# StandardError=file:/usr/local/anylink-deploy/log/anylink-systemd.log
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Reference in New Issue
Block a user