diff options
author | Kali Kaneko <kali@leap.se> | 2017-08-24 01:31:23 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2017-08-30 16:18:06 -0400 |
commit | 116af66d410ee3a4ee69a8fa25c6036ed1c2411f (patch) | |
tree | 189771e66ca4ef0d62096d14eb6638e6fd05eec2 /src/leap/bitmask/vpn/helpers/linux/bitmask-root | |
parent | 34d59f070d13ec2ac09c07cc7e0ec6a5d559fef9 (diff) |
[refactor] restart by allowing to send SIGUSR1 to openvpn process
by properly allowing openvpn to restart when receiving SIGUSR1, we can
reserve the hard process restarts for cases in which the process is
aborted.
this depends on bitmask-root adding --persist-tun and --persist-key as
mandatory/allowed parameters.
Diffstat (limited to 'src/leap/bitmask/vpn/helpers/linux/bitmask-root')
-rwxr-xr-x | src/leap/bitmask/vpn/helpers/linux/bitmask-root | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/leap/bitmask/vpn/helpers/linux/bitmask-root b/src/leap/bitmask/vpn/helpers/linux/bitmask-root index 80ac12e8..cad082be 100755 --- a/src/leap/bitmask/vpn/helpers/linux/bitmask-root +++ b/src/leap/bitmask/vpn/helpers/linux/bitmask-root @@ -73,7 +73,7 @@ def get_no_group_name(): return None -VERSION = "6" +VERSION = "7" SCRIPT = "bitmask-root" NAMESERVER = "10.42.0.1" BITMASK_CHAIN = "bitmask" @@ -105,7 +105,8 @@ FIXED_FLAGS = [ "--management-signal", "--script-security", "1", "--user", "nobody", - "--remap-usr1", "SIGTERM", + "--persist-key", + "--persist-tun", ] if OPENVPN_GROUP is not None: @@ -121,7 +122,8 @@ ALLOWED_FLAGS = { "--cert": ["FILE"], "--key": ["FILE"], "--ca": ["FILE"], - "--fragment": ["NUMBER"] + "--fragment": ["NUMBER"], + "--keepalive": ["NUMBER", "NUMBER"], } PARAM_FORMATS = { @@ -964,6 +966,7 @@ def main(): else: bail("ERROR: No such command") + if __name__ == "__main__": debug(" ".join(sys.argv)) main() |