summaryrefslogtreecommitdiff
path: root/cronjob.py
diff options
context:
space:
mode:
Diffstat (limited to 'cronjob.py')
-rwxr-xr-xcronjob.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cronjob.py b/cronjob.py
index 14061b9..894d1cc 100755
--- a/cronjob.py
+++ b/cronjob.py
@@ -24,10 +24,10 @@ curs = DB.execute('SELECT name, asn FROM peers WHERE deleted=1')
while row := curs.fetchone():
name, asn = row
print(f'Deleting {asn}-{name}...')
+ os.system(f'systemctl disable --now wg-quick@wg{asn%10000:04}{name}')
try: os.remove(f'/etc/bird/peers/as{asn}{name}.conf')
except FileNotFoundError: pass
try: os.remove(f'/etc/wireguard/wg{asn%10000:04}{name}.conf')
except FileNotFoundError: pass
- os.system(f'systemctl disable --now wg-quick@wg{asn%10000:04}{name}')
os.system('birdc configure')