对于centos7或者比较新版本的机器可以直接配置systemd

# /usr/lib/systemd/system/[email protected]
[Unit]
Description=GO Simple Tunnel
After=network.target

[Service]
Type=simple
User=nobody
ExecStart=/usr/bin/gost -C /etc/gost/%i.json

[Install]
WantedBy=multi-user.target

直接systemctl enable [email protected]就行了。
启动是systemctl start [email protected]

config是配置存储的文件名,/etc/gost/config.json。

作者 admin

发表评论

您的电子邮箱地址不会被公开。