v1.1.7-test
~新增自定义本机host地址的功能(7-6-8) ~屏蔽核心自带的节点保存功能(会占用更多空间) ~修复部分情况下检测本机host失败的bug ~修复部分情况下导入配置文件失败的bug ~修复Debian等默认使用dash的系统下运行出错的bug
This commit is contained in:
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
clash_v=1.4.2
|
||||
clashpre_v=2021.03.10
|
||||
GeoIP_v=20210312
|
||||
versionsh=[A[B1.1.6
|
||||
versionsh=1.1.7
|
||||
|
||||
@@ -86,7 +86,7 @@ gettar(){
|
||||
fi
|
||||
#修饰文件及版本号
|
||||
shtype=sh && [ -n "$(ls -l /bin/sh|grep -o dash)" ] && shtype=bash
|
||||
sed -i "s%#!/bin/sh%#!/bin/$shtype%g" $clashdir/start.sh
|
||||
sed -i "s|/bin/sh|/bin/$shtype|" $clashdir/start.sh
|
||||
chmod 777 $clashdir/start.sh
|
||||
sed -i '/versionsh_l=*/'d $clashdir/mark
|
||||
echo versionsh_l=$release_new >> $clashdir/mark
|
||||
|
||||
@@ -363,17 +363,22 @@ gettar(){
|
||||
fi
|
||||
#修饰文件及版本号
|
||||
shtype=sh && [ -n "$(ls -l /bin/sh|grep -o dash)" ] && shtype=bash
|
||||
sed -i "s%#!/bin/sh%#!/bin/$shtype%g" $clashdir/start.sh
|
||||
sed -i "s|/bin/sh|/bin/$shtype|" $clashdir/start.sh
|
||||
chmod 777 $clashdir/start.sh
|
||||
sed -i '/versionsh_l=*/'d $clashdir/mark
|
||||
echo versionsh_l=$release_new >> $clashdir/mark
|
||||
#设置环境变量
|
||||
[ -w ~/.bashrc ] && profile=~/.bashrc
|
||||
[ -w /etc/profile ] && profile=/etc/profile
|
||||
sed -i '/alias clash=*/'d $profile
|
||||
echo "alias clash=\"$shtype $clashdir/clash.sh\"" >> $profile #设置快捷命令环境变量
|
||||
sed -i '/export clashdir=*/'d $profile
|
||||
echo "export clashdir=\"$clashdir\"" >> $profile #设置clash路径环境变量
|
||||
if [ -n "$profile" ];then
|
||||
sed -i '/alias clash=*/'d $profile
|
||||
echo "alias clash=\"$shtype $clashdir/clash.sh\"" >> $profile #设置快捷命令环境变量
|
||||
sed -i '/export clashdir=*/'d $profile
|
||||
echo "export clashdir=\"$clashdir\"" >> $profile #设置clash路径环境变量
|
||||
else
|
||||
echo 无法写入环境变量!请检查安装权限!
|
||||
exit 1
|
||||
fi
|
||||
#删除临时文件
|
||||
rm -rf /tmp/clashfm.tar.gz
|
||||
rm -rf $clashdir/clashservice
|
||||
|
||||
Reference in New Issue
Block a user