Merge "Add ipsec.secrets reload function to strongSwan driver"
This commit is contained in:
commit
f82e5c7415
@ -158,8 +158,20 @@ class StrongSwanProcess(ipsec.BaseSwanProcess):
|
|||||||
|
|
||||||
def restart(self):
|
def restart(self):
|
||||||
"""Restart the process."""
|
"""Restart the process."""
|
||||||
|
self.reload_secrets()
|
||||||
self.reload()
|
self.reload()
|
||||||
|
|
||||||
|
def reload_secrets(self):
|
||||||
|
"""Reload the ipsec.secrets file.
|
||||||
|
|
||||||
|
Flushes and rereads all secrets defined in ipsec.secrets. This needs
|
||||||
|
to be done each time when a new site connection is associated with
|
||||||
|
a VPN service which already hosts a site connection - 'ipsec reload'
|
||||||
|
does not reload the secrets and new connections will not authenticate
|
||||||
|
properly.
|
||||||
|
"""
|
||||||
|
self._execute([self.binary, 'rereadsecrets'])
|
||||||
|
|
||||||
def reload(self):
|
def reload(self):
|
||||||
"""Reload the process.
|
"""Reload the process.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user