From 7b8b60a39f39999fa7d7a33f182620f33bd7f13b Mon Sep 17 00:00:00 2001 From: steering7253 Date: Fri, 10 Apr 2026 21:45:47 +0000 Subject: fix delete wg and fix authorized_keys notify --- authorized_keys.sh | 2 +- cronjob.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/authorized_keys.sh b/authorized_keys.sh index 24bf72e..d16588f 100755 --- a/authorized_keys.sh +++ b/authorized_keys.sh @@ -3,7 +3,7 @@ set -o pipefail cd /opt/autopeer -NOTIFY_TO="$(python -c 'import config; print(config.NOTIFY_TO)')" +NOTIFY_TO="$(python3 -c 'import config; print(config.NOTIFY_TO)')" user="$1" if [ "$1" = "new" ]; then 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') -- cgit v1.3.1-10-gc9f91