diff options
| -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') |
