use runCommand instead

This commit is contained in:
Max Lv
2013-10-13 08:55:10 +08:00
parent 78108e1268
commit c96dde8644
2 changed files with 3 additions and 5 deletions
@@ -140,8 +140,7 @@ class ShadowVpnService extends VpnService {
def startShadowsocksDaemon() {
val cmd: String = (BASE +
"shadowsocks -b 127.0.0.1 -s \"%s\" -p \"%d\" -l \"%d\" -k \"%s\" -m \"%s\" -f " +
BASE +
"shadowsocks.pid")
BASE + "shadowsocks.pid")
.format(config.proxy, config.remotePort, config.localPort, config.sitekey, config.encMethod)
if (BuildConfig.DEBUG) Log.d(TAG, cmd)
System.exec(cmd)
@@ -158,10 +158,9 @@ class ShadowsocksService extends Service {
val cmd: String = (BASE +
"shadowsocks -b 127.0.0.1 -s \"%s\" -p \"%d\" -l \"%d\" -k \"%s\" -m \"%s\" -f " +
BASE + "shadowsocks.pid")
.format(config.proxy, config.remotePort, config.localPort, config.sitekey,
config.encMethod)
.format(config.proxy, config.remotePort, config.localPort, config.sitekey, config.encMethod)
if (BuildConfig.DEBUG) Log.d(TAG, cmd)
System.exec(cmd)
Utils.runCommand(cmd)
}
def startDnsDaemon() {