v1.4.4-test

~适配hanwckf及chongshengb等版本Padavan固件
This commit is contained in:
juewuy
2021-07-26 16:50:00 +08:00
parent b97bcc14ab
commit cd801e120c

View File

@@ -758,7 +758,15 @@ restart)
$0 start
;;
init)
[ -d "/etc/storage/clash" ] && clashdir=/etc/storage/clash && profile=/opt/etc/profile
if [ -d "/etc/storage/clash" ];then
clashdir=/etc/storage/clash
if [ -w "/opt/etc/profile" ];then
profile=/opt/etc/profile
else
profile=/etc/profile
sed -i '' $profile #将软链接转化为一般文件
fi
fi
[ -d "/jffs/clash" ] && clashdir=/jffs/clash && profile=/jffs/configs/profile.add
echo "alias clash=\"$clashdir/clash.sh\"" >> $profile
echo "export clashdir=\"$clashdir\"" >> $profile