summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2017-08-22 19:20:47 +0200
committerRuben Pollan <meskio@sindominio.net>2017-09-15 23:40:04 +0200
commit205571493d2d71d328b1762953db5d4271db0acb (patch)
treeca1ecc1db5d2479890b01b8a7adc6bfa5ebf8e11
parentc26d3f4068b3d4e104d61a41ef2e74f98e12c24a (diff)
[feat] add --nodaemon param to polkit_agent
-rw-r--r--src/leap/bitmask/vpn/helpers/linux/polkit_agent.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/leap/bitmask/vpn/helpers/linux/polkit_agent.py b/src/leap/bitmask/vpn/helpers/linux/polkit_agent.py
index 7939b24d..26fd7c8c 100644
--- a/src/leap/bitmask/vpn/helpers/linux/polkit_agent.py
+++ b/src/leap/bitmask/vpn/helpers/linux/polkit_agent.py
@@ -21,6 +21,7 @@ Daemonizes polkit authentication agent.
import os
import subprocess
+import sys
import daemon
@@ -74,6 +75,7 @@ def launch():
if __name__ == "__main__":
- # TODO pass a --nodaemon flag so that we can launch this in the foreground
- # and debug this module, getting errors to stderr.
- launch()
+ if '--nodaemon' in sys.argv:
+ _launch_agent()
+ else:
+ launch()