From bca037330893403ee20e8d6381db9b375c137c19 Mon Sep 17 00:00:00 2001 From: steering7253 Date: Wed, 8 Apr 2026 16:36:59 +0000 Subject: misc fixes --- cronjob.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cronjob.py') diff --git a/cronjob.py b/cronjob.py index 84c5e24..38a19a9 100755 --- a/cronjob.py +++ b/cronjob.py @@ -10,11 +10,11 @@ while row := curs.fetchone(): name, asn = row print(f'Processing {asn}-{name}...') birdcfg = open(f'/etc/bird/peers/as{asn}{name}.conf', 'w') - wgcfg = open(f'/etc/wireguard/wg{asn%10000}{name}.conf', 'w') + wgcfg = open(f'/etc/wireguard/wg{asn%10000:04}{name}.conf', 'w') print(_bird_config(name, _get_peer_info(name, asn), _get_my_info(asn)), file=birdcfg) print(_wg_config(name, _get_peer_info(name, asn), _get_my_info(asn)), file=wgcfg) birdcfg.close() wgcfg.close() - os.system(f'systemctl enable --now wg-quick@wg-{asn}-{name}') + os.system(f'systemctl enable --now wg-quick@wg{asn%10000:04}{name}') os.system('birdc configure') -- cgit v1.3.1-10-gc9f91