v1.0.0beta8fix2
~修复手动更新订阅功能出错的bug ~调整本机代理功能设置 ~修复GoogleHome无法使用的问题 ~调整启动脚本,适配部分采用openwrt12等旧版本的设备
This commit is contained in:
Binary file not shown.
@@ -1,2 +1,2 @@
|
|||||||
GeoIP_v=20200917
|
GeoIP_v=20200917
|
||||||
versionsh=1.0.0beta8fix2
|
versionsh=1.0.0beta8fix3
|
||||||
|
|||||||
@@ -3,23 +3,12 @@
|
|||||||
|
|
||||||
getconfig(){
|
getconfig(){
|
||||||
#系统类型
|
#系统类型
|
||||||
systype=$(cat /proc/version | grep -io openwrt)
|
if [ -f /bin/opkg ];then
|
||||||
if [ -n "$systype" ];then
|
|
||||||
host=$(ubus call network.interface.lan status | grep \"address\" | grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}';)
|
host=$(ubus call network.interface.lan status | grep \"address\" | grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}';)
|
||||||
if [ -f /etc/rc.d/*clash ];then
|
|
||||||
autostart=enable_rc
|
|
||||||
else
|
|
||||||
autostart=disable_rc
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
cron_user='root '
|
cron_user='root '
|
||||||
host=$(ip a|grep -w 'inet'|grep 'global'|grep -E '192.|10.'|sed 's/.*inet.//g'|sed 's/\/[0-9][0-9].*$//g')
|
host=$(ip a|grep -w 'inet'|grep 'global'|grep -E '192.|10.'|sed 's/.*inet.//g'|sed 's/\/[0-9][0-9].*$//g')
|
||||||
[ -z $host ] && host=127.0.0.1
|
[ -z $host ] && host=127.0.0.1
|
||||||
if [ -n "$(systemctl list-unit-files clash.service | grep -o enable)" ];then
|
|
||||||
autostart=enable_sys
|
|
||||||
else
|
|
||||||
autostart=disable_sys
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
#服务器地址
|
#服务器地址
|
||||||
[ -z "$update_url" ] && update_url=https://cdn.jsdelivr.net/gh/juewuy/ShellClash
|
[ -z "$update_url" ] && update_url=https://cdn.jsdelivr.net/gh/juewuy/ShellClash
|
||||||
@@ -37,7 +26,20 @@ fi
|
|||||||
source $ccfg
|
source $ccfg
|
||||||
#检查mac地址记录
|
#检查mac地址记录
|
||||||
[ ! -f $clashdir/mac ] && touch $clashdir/mac
|
[ ! -f $clashdir/mac ] && touch $clashdir/mac
|
||||||
#获取自启状态
|
#开机自启相关
|
||||||
|
if [ -f /etc/rc.common ];then
|
||||||
|
if [ -f /etc/rc.d/*clash ];then
|
||||||
|
autostart=enable_rc
|
||||||
|
else
|
||||||
|
autostart=disable_rc
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ -n "$(systemctl list-unit-files clash.service | grep -o enable)" ];then
|
||||||
|
autostart=enable_sys
|
||||||
|
else
|
||||||
|
autostart=disable_sys
|
||||||
|
fi
|
||||||
|
fi
|
||||||
if [ "$start_old" = "已开启" ];then
|
if [ "$start_old" = "已开启" ];then
|
||||||
auto="\033[33m已设置保守模式!\033[0m"
|
auto="\033[33m已设置保守模式!\033[0m"
|
||||||
auto1="\033[36m设为\033[0m常规模式启动"
|
auto1="\033[36m设为\033[0m常规模式启动"
|
||||||
|
|||||||
Reference in New Issue
Block a user