|
本帖最后由 8267 于 2025-7-26 10:36 编辑
看看大佬的解决方法 如何解决呢
- add_join() {
- # an (empty) config file will cause ZT to join a network
- [ ! -f "$CONFIG_PATH/networks.d/$1.conf" ] && touch $CONFIG_PATH/networks.d/$1.conf
- }
- mkdir -p /tmp/zero/peers.d
- if [ ! -L "${config_path}/peers.d" ] ; then
- rm -rf ${config_path}/peers.d
- ln -sf /tmp/zero/peers.d ${config_path}/peers.d
- fi
- mkdir -p /tmp/zero/controller.d
- if [ ! -L "${config_path}/controller.d" ] ; then
- rm -rf ${config_path}/controller.d
- ln -sf /tmp/zero/controller.d ${config_path}/controller.d
- fi
- touch /tmp/zero/zerotier-one.pid
- if [ ! -L "${config_path}/zerotier-one.pid" ] ; then
- rm -rf ${config_path}/zerotier-one.pid
- ln -sf /tmp/zero/zerotier-one.pid ${config_path}/zerotier-one.pid
- fi
- touch /tmp/zero/zerotier-one.port
- if [ ! -L "${config_path}/zerotier-one.port" ] ; then
- rm -rf ${config_path}/zerotier-one.port
- ln -sf /tmp/zero/zerotier-one.port ${config_path}/zerotier-one.port
- fi
- touch /tmp/zero/metrics.prom
- if [ ! -L "${config_path}/metrics.prom" ] ; then
- rm -rf ${config_path}/metrics.prom
- ln -sf /tmp/zero/metrics.prom ${config_path}/metrics.prom
- fi
- config_list_foreach $cfg 'join' add_join
- procd_open_instance
- procd_set_param command $PROG $ARGS $CONFIG_PATH
- procd_set_param stderr 1
- procd_close_instance
复制代码
我这么改了启动脚本/etc/init.d/zerotier
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
×
|