diff options
| author | 2026-04-10 21:45:47 +0000 | |
|---|---|---|
| committer | 2026-04-10 21:45:47 +0000 | |
| commit | 7b8b60a39f39999fa7d7a33f182620f33bd7f13b (patch) | |
| tree | 49fc7f3a67aa8f98872bd0a332122a92bdb771f4 | |
| parent | add ip to login notifications (diff) | |
fix delete wg and fix authorized_keys notify
| -rwxr-xr-x | authorized_keys.sh | 2 | ||||
| -rwxr-xr-x | 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 @@ -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') |
