~配置文件覆写功能增加退出时的重启提示
~检查更新时增加剩余空间检测及报警(<5M)
~修复启用软固化一直提示未配置及有关报错问题
~修复每次重启时重复添加多个自定义代理的bug
~修复linux系统下将运行日志错误打印到硬盘的bug
~配置文件覆写功能相关报错修复
This commit is contained in:
juewuy
2023-06-25 14:02:12 +08:00
parent e14a02f35e
commit c491c58281
7 changed files with 26 additions and 11 deletions

View File

@@ -375,6 +375,7 @@ modify_yaml(){
}
#插入自定义代理
sed -i "/#自定义代理/d" $tmpdir/proxies.yaml
sed -i "/#自定义代理/d" $tmpdir/proxy-groups.yaml
[ -n "$(grep -Ev '^#' $clashdir/proxies.yaml 2>/dev/null)" ] && {
space_proxy=$(cat $tmpdir/proxies.yaml | grep -E '^ *- ' | head -n 1 | grep -oE '^ *') #获取空格数
cat $clashdir/proxies.yaml | sed "s/^ *- /${space_proxy}- /g" | sed "/^#/d" | sed "/^ *$/d" | sed 's/#.*/ #自定义代理/g' >> $tmpdir/proxies.yaml #插入节点
@@ -1219,7 +1220,7 @@ bfstart(){
[ -z "$(grep 'procd_set_param user shellclash' /etc/init.d/clash)" ] && \
sed -i '/procd_close_instance/i\\t\tprocd_set_param user shellclash' /etc/init.d/clash
elif [ -w "$servdir" ]; then
setconfig ExecStart "/bin/su shellclash -c \"$bindir/clash -d $bindir\"" $servdir
setconfig ExecStart "/bin/su shellclash -c \"$bindir/clash -d $bindir >/dev/null\"" $servdir
systemctl daemon-reload >/dev/null
fi
fi