summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/core/launcher.py
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2016-09-26 18:09:30 -0400
committerKali Kaneko (leap communications) <kali@leap.se>2016-09-26 18:09:30 -0400
commita61019a5d30502a06b3a0ef09ca32044b8d09e2b (patch)
treeaad1f84e8d539ab5b23609e71dcd17d529d6de87 /src/leap/bitmask/core/launcher.py
parent24e9d3bbc98232062a4233f7f5de4f00cc256242 (diff)
[feature] rotate logs
Diffstat (limited to 'src/leap/bitmask/core/launcher.py')
-rw-r--r--src/leap/bitmask/core/launcher.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/leap/bitmask/core/launcher.py b/src/leap/bitmask/core/launcher.py
index b8916a1e..27e5a26d 100644
--- a/src/leap/bitmask/core/launcher.py
+++ b/src/leap/bitmask/core/launcher.py
@@ -17,7 +17,7 @@
"""
Run bitmask daemon.
"""
-from os.path import join
+from os.path import join, abspath
from sys import argv
from twisted.scripts.twistd import run
@@ -25,6 +25,9 @@ from twisted.scripts.twistd import run
from leap.bitmask.util import here
from leap.bitmask import core
from leap.bitmask.core import flags
+from leap.common.config import get_path_prefix
+
+pid = abspath(join(get_path_prefix(), 'leap', 'bitmaskd.pid'))
def run_bitmaskd():
@@ -35,8 +38,7 @@ def run_bitmaskd():
flags.BACKEND = argv[index + 1]
argv[1:] = [
'-y', join(here(core), "bitmaskd.tac"),
- '--pidfile', '/tmp/bitmaskd.pid',
- '--logfile', '/tmp/bitmaskd.log',
+ '--pidfile', pid,
'--umask=0022',
]
print '[+] launching bitmaskd...'