make sure Tor path link is cleanly setup and chmod'd

This commit is contained in:
Nathan Freitas 2014-01-15 00:33:51 -05:00
parent e55f724b00
commit 3b9d6c8eaa
1 changed files with 7 additions and 11 deletions

View File

@ -512,22 +512,18 @@ public class TorService extends Service implements TorServiceConstants, TorConst
else
{
if (fileTorLink.exists())
{
StringBuilder log = new StringBuilder();
String[] cmdDel = { "rm " + fileTorLink.getAbsolutePath() };
String[] cmdDel = { SHELL_CMD_RM + ' ' + fileTorLink.getAbsolutePath() };
int errCode = TorServiceUtils.doShellCommand(cmdDel,log, false, true);
logNotice("link RM err=" + errCode + " out: " + log.toString());
}
StringBuilder log = new StringBuilder();
log = new StringBuilder();
String[] cmd = { SHELL_CMD_LINK + ' ' + fileTorOrig.getAbsolutePath() + ' ' + fileTorLink.getAbsolutePath() };
int errCode = TorServiceUtils.doShellCommand(cmd,log, false, true);
errCode = TorServiceUtils.doShellCommand(cmd,log, false, true);
logNotice("link LN err=" + errCode + " out: " + log.toString());
enableBinExec(fileTorOrig);
enableBinExec(fileTorLink);
enableBinExec(filePrivoxy);
enableBinExec(fileObfsProxy);
enableBinExec(fileXtables);