Add version number to config tarballs

Preparing to rework the updater script.
This commit is contained in:
Timotej Lazar 2023-06-26 18:26:35 +02:00
parent fb1c328893
commit 4fb2d2c732

View file

@ -75,6 +75,10 @@ def save_config():
os.makedirs(f'{output}/etc/nftables.d', exist_ok=True) os.makedirs(f'{output}/etc/nftables.d', exist_ok=True)
os.makedirs(f'{output}/etc/wireguard', exist_ok=True) os.makedirs(f'{output}/etc/wireguard', exist_ok=True)
# Print version.
with open(f'{output}/version', 'w', encoding='utf-8') as f:
print(version, file=f)
# Print nftables sets. # Print nftables sets.
with open(f'{output}/etc/nftables.d/sets.nft', 'w', encoding='utf-8') as f: with open(f'{output}/etc/nftables.d/sets.nft', 'w', encoding='utf-8') as f:
def format_set(name, ips): def format_set(name, ips):