summaryrefslogtreecommitdiff
path: root/src/conf_mode/nat.py
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2025-05-20 15:28:12 +0100
committerGitHub <noreply@github.com>2025-05-20 15:28:12 +0100
commit37598a366e8d17fc7a546b23d3a4d8ff097272ce (patch)
treea4e6e35705a11366fe9d5e055697687b30434514 /src/conf_mode/nat.py
parentd15000b645c690c4d67dc6bb6bc924f16703e352 (diff)
parentab602253d57c1fb4a01a9c84f75bbbc480a66189 (diff)
downloadvyos-1x-37598a366e8d17fc7a546b23d3a4d8ff097272ce.tar.gz
vyos-1x-37598a366e8d17fc7a546b23d3a4d8ff097272ce.zip
Merge pull request #4468 from sarthurdev/T5707
wireguard: T7387: Optimise wireguard peer handling
Diffstat (limited to 'src/conf_mode/nat.py')
-rwxr-xr-xsrc/conf_mode/nat.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/conf_mode/nat.py b/src/conf_mode/nat.py
index 504b3e82a..6c88e5cfd 100755
--- a/src/conf_mode/nat.py
+++ b/src/conf_mode/nat.py
@@ -16,8 +16,8 @@
import os
+from glob import glob
from sys import exit
-from pathlib import Path
from vyos.base import Warning
from vyos.config import Config
@@ -265,9 +265,9 @@ def apply(nat):
text = f'# Automatically generated by nat.py\nThis file indicates that vyos-domain-resolver service is used by nat.\n'
write_file(domain_resolver_usage, text)
elif os.path.exists(domain_resolver_usage):
- Path(domain_resolver_usage).unlink(missing_ok=True)
+ os.unlink(domain_resolver_usage)
- if not Path('/run').glob('use-vyos-domain-resolver*'):
+ if not glob('/run/use-vyos-domain-resolver*'):
domain_action = 'stop'
call(f'systemctl {domain_action} vyos-domain-resolver.service')