summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2016-10-21 17:01:43 -0400
committerKali Kaneko (leap communications) <kali@leap.se>2016-10-21 17:17:37 -0400
commitc50ebc8d23916b7f5e35f399936cd4ff5f239c12 (patch)
treee3a78d53ee443c3b2521c5fb4da2aedd884264df /src
parent478132e3e29eabc6b052df7f06cd1ba1a558ee00 (diff)
[bug] avoid passing posix-only args to twistd on windows
Diffstat (limited to 'src')
-rw-r--r--src/leap/bitmask/core/launcher.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/leap/bitmask/core/launcher.py b/src/leap/bitmask/core/launcher.py
index cbe4064..62e8575 100644
--- a/src/leap/bitmask/core/launcher.py
+++ b/src/leap/bitmask/core/launcher.py
@@ -18,6 +18,7 @@
Run bitmask daemon.
"""
from os.path import join, abspath, dirname
+import platform
import sys
from twisted.scripts.twistd import run
@@ -29,10 +30,8 @@ from leap.common.config import get_path_prefix
pid = abspath(join(get_path_prefix(), 'leap', 'bitmaskd.pid'))
-
STANDALONE = getattr(sys, 'frozen', False)
-
def here(module=None):
if STANDALONE:
# we are running in a |PyInstaller| bundle
@@ -46,16 +45,19 @@ def here(module=None):
def run_bitmaskd():
# TODO --- configure where to put the logs... (get --logfile, --logdir
- # from the bitmask_cli
+ # from bitmaskctl
for (index, arg) in enumerate(sys.argv):
if arg == '--backend':
flags.BACKEND = sys.argv[index + 1]
- sys.argv[1:] = [
+ args = [
'-y', join(here(core), "bitmaskd.tac"),
- '--pidfile', pid,
- '--umask', '0022',
'--logfile', getLogPath(),
]
+ if platform.system() != 'Windows':
+ args.append([
+ '--pidfile', pid,
+ '--umask', '0022'])
+ sys.argv[1:] = args
print '[+] launching bitmaskd...'
run()