This commit is contained in:
1 parent
7163f167e0
commit
a6b25b8bb4
5 files changed
+27
-6
No files matched your search
@@ -318,7 +318,9 @@ def refresh_docker_rules():
|
||||
"""Apply the new settings to the Docker rules while Docker is running.
|
||||
|
||||
When Docker is not running, vpn-router-docker applies them after
|
||||
docker.service starts.
|
||||
docker.service starts. The restart is waited for, so the rules are in place
|
||||
when this setup ends; vpn-router-docker is therefore not ordered after
|
||||
vpn-router-setup.
|
||||
"""
|
||||
if unit_is_active('docker.service'):
|
||||
run(['systemctl', 'restart', 'vpn-router-docker.service'], check=False)
|
||||
@@ -332,7 +334,8 @@ def refresh_web(cfg, ctx):
|
||||
secrets masked and the facts resolved from the system from a file here, so
|
||||
that it needs nothing but the standard library and the configuration code.
|
||||
The file is readable by root only. The service ends quietly when
|
||||
web.enabled is false.
|
||||
web.enabled is false. The restart is queued, not waited for, because the
|
||||
unit is ordered after vpn-router-setup.
|
||||
"""
|
||||
masked = {
|
||||
section: {option: '********' if SECRET_OPTION.search(option) and value else value
|
||||
@@ -363,7 +366,7 @@ def refresh_web(cfg, ctx):
|
||||
'remote_cidrs': ctx['remote_cidr_list'],
|
||||
},
|
||||
}) + '\n', encoding='utf-8')
|
||||
run(['systemctl', 'restart', 'vpn-router-web.service'], check=False)
|
||||
run(['systemctl', 'restart', '--no-block', 'vpn-router-web.service'], check=False)
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
Reference in new issue
Block a user