summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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()