~现在启动后会自动进行一次系统时间同步(使用ntpd)
~修复错误读取/tmp目录内核及配置文件导致的一系列bug
This commit is contained in:
juewuy
2023-02-02 12:18:03 +08:00
parent 70290746b4
commit ef1fd70a32
6 changed files with 6 additions and 4 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -3,4 +3,4 @@ clashpre_v=2022.11.25
clash_v=v1.7.1
meta_v=v1.13.2
GeoIP_v=20230128
versionsh=1.7.0d
versionsh=1.7.0e

View File

@@ -98,7 +98,7 @@ ckstatus(){
#检查执行权限
[ ! -x $clashdir/start.sh ] && chmod +x $clashdir/start.sh
#检查/tmp内核文件
for file in `find /tmp -name "clash-linux*" -o -name "clash"` ; do
for file in `ls -F /tmp | grep -v [/\$] | grep -iE '^clash$|^clash-linux*'` ; do
chmod +x $file
tmp_version=$($file -v 2>/dev/null)
if [ -n "$tmp_version" ];then
@@ -127,7 +127,7 @@ ckstatus(){
done
#检查/tmp配置文件
[ -x $bindir/clash ] && \
for file in `find /tmp -name "*.yaml" -o -name "*.yml"` ; do
for file in `ls -F /tmp | grep -v [/\$] | grep -iE '.yaml$|.yml$'` ; do
$bindir/clash -t -d $bindir -f $file &>/dev/null && {
echo -e "\033[32m发现可用的YAML配置文件\033[0m"
echo $file

View File

@@ -1,7 +1,7 @@
#!/bin/sh
# Copyright (C) Juewuy
version=1.7.0d
version=1.7.0e
setdir(){
dir_avail(){

View File

@@ -1233,6 +1233,8 @@ afstart(){
[ "$local_proxy" = "已开启" ] && [ "$local_type" = "iptables增强模式" ] && start_output
[ "$local_proxy" = "已开启" ] && [ "$local_type" = "nftables增强模式" ] && [ "$redir_mod" = "纯净模式" ] && start_nft
ckcmd iptables && start_wan
#同步本机时间
ckcmd ntpd && ntpd -n -q -p ntp.aliyun.com
#标记启动时间
mark_time
#加载定时任务