mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-08-07 15:25:41 +08:00
fix systemd
This commit is contained in:
16
README.md
16
README.md
@@ -78,6 +78,22 @@ sudo ./anylink -conf="conf/server.toml"
|
|||||||
|
|
||||||
[conf/server.toml](server/conf/server.toml)
|
[conf/server.toml](server/conf/server.toml)
|
||||||
|
|
||||||
|
## systemd
|
||||||
|
|
||||||
|
添加 systemd脚本
|
||||||
|
* anylink 程序目录放入 `/usr/local/anylink-deploy`
|
||||||
|
|
||||||
|
systemd 脚本放入:
|
||||||
|
* centos: `/usr/lib/systemd/system/`
|
||||||
|
* ubuntu: `/lib/systemd/system/`
|
||||||
|
|
||||||
|
操作命令:
|
||||||
|
* 启动: `systemctl start anylink`
|
||||||
|
* 停止: `systemctl stop anylink`
|
||||||
|
* 开机自启: `systemctl enable anylink`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Setting
|
## Setting
|
||||||
|
|
||||||
网络模式选择,需要配置 `link_mode` 参数,如 `link_mode="tun"`,`link_mode="tap"` 两种参数。 不同的参数需要对服务器做相应的设置。
|
网络模式选择,需要配置 `link_mode` 参数,如 `link_mode="tun"`,`link_mode="tap"` 两种参数。 不同的参数需要对服务器做相应的设置。
|
||||||
|
@@ -8,6 +8,6 @@ User=root
|
|||||||
WorkingDirectory= /usr/local/anylink-deploy
|
WorkingDirectory= /usr/local/anylink-deploy
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=5s
|
RestartSec=5s
|
||||||
ExecStart=/usr/local/anylink-deploy/anylink -conf="conf/server.toml"
|
ExecStart=/usr/local/anylink-deploy/anylink -conf=conf/server.toml
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
Reference in New Issue
Block a user