v1.3.4-test

~适配Padavan及华硕固件
This commit is contained in:
juewuy
2021-06-05 12:53:20 +08:00
parent bc5d16f09c
commit a2f7552e25
4 changed files with 68 additions and 57 deletions

View File

@@ -4,6 +4,8 @@
#脚本内部工具
getconfig(){
#加载配置文件
[ -n "/etc/storage/clash" ] && clashdir=/etc/storage/clash
[ -n "/jffs/clash" ] && clashdir=/etc/storage/clash
[ -z "$clashdir" ] && clashdir=$(cat /etc/profile | grep clashdir | awk -F "\"" '{print $2}')
[ -z "$clashdir" ] && clashdir=$(cat ~/.bashrc | grep clashdir | awk -F "\"" '{print $2}')
ccfg=$clashdir/mark
@@ -705,6 +707,13 @@ restart)
$0 stop
$0 start
;;
init)
[ -n "/etc/storage/clash" ] && clashdir=/etc/storage/clash
[ -n "/jffs/clash" ] && clashdir=/etc/storage/clash
echo "alias clash=\"$clashdir/clash.sh\"" >> /opt/etc/profile
echo "export clashdir=\"$clashdir\"" >> /opt/etc/profile
$0 start
;;
getyaml)
getconfig
getyaml