Xray-install
Xray-install copied to clipboard
关于geodata更新问题
设置了定时命令来更新该脚本
bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ install-geodata
请问该脚本更新完毕后还需要重新启动xray服务以确保新dat文件生效吗
是的
~~https://github.com/KoinuDayo/GeoDataUpdater~~
好的,谢谢各位解答!
~https://github.com/KoinuDayo/GeoDataUpdater~
收藏了。
@shandongtlb 我是用的一个.sh 定时执行 文件内容是curl 下载 下载完重启下xray
~https://github.com/KoinuDayo/GeoDataUpdater~
收藏了。
@shandongtlb 我是用的一个.sh 定时执行 文件内容是curl 下载 下载完重启下xray
谢谢!
printf "0 7 * * * /root/update_geodata.sh\n" > update && crontab update && rm update && printf "#\041/usr/bin/env bash\ncurl -sLo /usr/local/share/xray/geoip.dat https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat\ncurl -sLo /usr/local/share/xray/geosite.dat https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat\nsystemctl restart xray\n" > update_geodata.sh && chmod +x update_geodata.sh
毫无技术的自己方便用的一行版
printf "0 7 * * * /root/update_geodata.sh\n" > update && crontab update && rm update && printf "#\041/usr/bin/env bash\ncurl -sLo /usr/local/share/xray/geoip.dat https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat\ncurl -sLo /usr/local/share/xray/geosite.dat https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat\nsystemctl restart xray\n" > update_geodata.sh && chmod +x update_geodata.sh
毫无技术的自己方便用的一行版
本人牛角尖+强迫症
0 4 * * * bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ install-geodata
只更新,不重启,生怕某天在用的时候重启被断掉(道理都明白,就是强迫症)
你这个大写的服呀
printf "0 7 * * * /root/update_geodata.sh\n" > update && crontab update && rm update && printf "#\041/usr/bin/env bash\ncurl -sLo /usr/local/share/xray/geoip.dat https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat\ncurl -sLo /usr/local/share/xray/geosite.dat https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat\nsystemctl restart xray\n" > update_geodata.sh && chmod +x update_geodata.sh
毫无技术的自己方便用的一行版
一行版执行完了还需要sh update_geodata.sh吗
一行版执行完了还需要sh update_geodata.sh吗
看了下,它这是定时自动执行,你用完一行可以直接不管它,到时间会自己执行的
@KoinuDayo 好的 谢谢
只更新,不重启,生怕某天在用的时候重启被断掉(道理都明白,就是强迫症)
你这句话给了我灵感,我在我的那个脚本内加入了个判断https://github.com/KoinuDayo/GeoDataUpdater/commit/490d7d81be314f45ad7ead71b98741e5d3042246 这样上游没更新就不会重启了
其实有没有一个类似于 xray reload
的指令,可以重新载入这一类会更新的东西?
印象中也有程序在收到SIGHUP
之后重新载入外部资料,也有利用systemctl reload xxx.service
的。