diff --git a/bin/clashfm.tar.gz b/bin/clashfm.tar.gz index 2879424..ea7d18f 100644 Binary files a/bin/clashfm.tar.gz and b/bin/clashfm.tar.gz differ diff --git a/bin/version b/bin/version index a9324da..e340b73 100644 --- a/bin/version +++ b/bin/version @@ -1,4 +1,4 @@ clash_v=1.6.0 clashpre_v=2021.05.08 GeoIP_v=20210611 -versionsh=1.3.11 +versionsh=1.3.12 diff --git a/scripts/clash.sh b/scripts/clash.sh index 4cb68a5..99b3705 100644 --- a/scripts/clash.sh +++ b/scripts/clash.sh @@ -507,10 +507,7 @@ localproxy(){ setconfig local_type $local_type localproxy elif [ "$num" = 3 ]; then - [ -w /etc/systemd/system/clash.service ] && servdir=/etc/systemd/system/clash.service - [ -w /usr/lib/systemd/system/clash.service ] && servdir=/usr/lib/systemd/system/clash.service - [ -x /bin/su ] && servdir=1 - if [ -n "$servdir" ];then + if [ -w /etc/systemd/system/clash.service -o -w /usr/lib/systemd/system/clash.service -o -x /bin/su ];then local_type="iptables增强模式" setconfig local_type $local_type else diff --git a/scripts/start.sh b/scripts/start.sh index 876048d..e09f849 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -669,6 +669,8 @@ bfstart(){ sed -Ei s/7890:7890/0:7890/g /etc/passwd fi if [ "$start_old" != "已开启" ];then + [ -w /etc/systemd/system/clash.service ] && servdir=/etc/systemd/system/clash.service + [ -w /usr/lib/systemd/system/clash.service ] && servdir=/usr/lib/systemd/system/clash.service setconfig ExecStart "/bin/su\ shellclash\ -c\ \"$bindir/clash\ -d\ $bindir\"" $servdir systemctl daemon-reload >/dev/null fi