openvpn: Always write the latest server configuration on setup

This takes care of the case where a user has tried the "setup" step and
failed. The new configuration will overwrite the old one.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Joseph Nuthalapati 2018-11-19 13:26:06 +05:30 committed by James Valleroy
parent 3a579e2d72
commit 43e7633868
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -147,9 +147,6 @@ def subcommand_upgrade(_):
def _create_server_config():
"""Write server configuration."""
if os.path.exists(SERVER_CONFIGURATION_PATH):
return
with open(SERVER_CONFIGURATION_PATH, 'w') as file_handle:
file_handle.write(SERVER_CONFIGURATION)