refine the commands
This commit is contained in:
@@ -327,8 +327,6 @@ class Shadowsocks
|
||||
ab.append("kill -9 `cat /data/data/com.github.shadowsocks/ss-local.pid`")
|
||||
ab.append("kill -9 `cat /data/data/com.github.shadowsocks/ss-tunnel.pid`")
|
||||
ab.append("kill -9 `cat /data/data/com.github.shadowsocks/tun2socks.pid`")
|
||||
ab.append("killall -9 pdnsd")
|
||||
ab.append("killall -9 tun2socks")
|
||||
ab.append("rm /data/data/com.github.shadowsocks/pdnsd.conf")
|
||||
ab.append("rm /data/data/com.github.shadowsocks/pdnsd.cache")
|
||||
|
||||
@@ -336,7 +334,6 @@ class Shadowsocks
|
||||
|
||||
ab.clear()
|
||||
ab.append("kill -9 `cat /data/data/com.github.shadowsocks/redsocks.pid`")
|
||||
ab.append("killall -9 redsocks")
|
||||
ab.append("rm /data/data/com.github.shadowsocks/redsocks.conf")
|
||||
ab.append(Utils.getIptables + " -t nat -F OUTPUT")
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ class ShadowsocksNatService extends Service with BaseService {
|
||||
}
|
||||
|
||||
val cmd = if (Build.VERSION.SDK_INT >= 20) {
|
||||
"system/bin/" + args
|
||||
"/system/bin/" + args
|
||||
} else {
|
||||
Path.BASE + args
|
||||
}
|
||||
@@ -185,7 +185,7 @@ class ShadowsocksNatService extends Service with BaseService {
|
||||
p.println(conf)
|
||||
})
|
||||
val cmd = if (Build.VERSION.SDK_INT >= 20) {
|
||||
"system/bin/" + args
|
||||
"/system/bin/" + args
|
||||
} else {
|
||||
Path.BASE + args
|
||||
}
|
||||
@@ -315,16 +315,14 @@ class ShadowsocksNatService extends Service with BaseService {
|
||||
val ab = new ArrayBuffer[String]
|
||||
|
||||
ab.append("kill -9 `cat " + Path.BASE + "ss-tunnel.pid`")
|
||||
|
||||
ab.append("kill -9 `cat " + Path.BASE +"redsocks.pid`")
|
||||
ab.append("killall -9 redsocks")
|
||||
|
||||
ab.append("kill -15 `cat " + Path.BASE + "pdnsd.pid`")
|
||||
ab.append("killall -15 pdnsd")
|
||||
|
||||
Console.runRootCommand(ab.toArray)
|
||||
ab.clear()
|
||||
|
||||
ab.clear()
|
||||
ab.append("kill -9 `cat " + Path.BASE + "ss-local.pid`")
|
||||
|
||||
Console.runCommand(ab.toArray)
|
||||
|
||||
Reference in New Issue
Block a user