mirror of
https://github.com/juewuy/ShellCrash.git
synced 2024-11-16 03:32:34 +08:00
fix: repeated add clash alias and $clashdir
This commit is contained in:
parent
392b8f6877
commit
651f21c7b6
|
@ -5,9 +5,12 @@ clashdir=/data/clash
|
|||
profile=/etc/profile
|
||||
|
||||
#h初始化环境变量
|
||||
echo "alias clash=\"$clashdir/clash.sh\"" >> $profile
|
||||
echo "export clashdir=\"$clashdir\"" >> $profile
|
||||
|
||||
if [ `type -t clash` != "alias" ];then
|
||||
echo "alias clash=\"$clashdir/clash.sh\"" >> $profile
|
||||
fi
|
||||
if [ -z $clashdir ];then
|
||||
echo "export clashdir=\"$clashdir\"" >> $profile
|
||||
fi
|
||||
#设置init.d服务并启动clash服务
|
||||
ln -sf $clashdir/clashservice /etc/init.d/clash
|
||||
chmod 755 /etc/init.d/clash
|
||||
|
|
Loading…
Reference in New Issue
Block a user