Converted router configuration file from .conf to JSON.

This commit is contained in:
slawek committed 2026-10-23 07:35:43 +02:00
1 parent c423ea9347
commit b18947ed9b
18 files changed
+285 -396

No files matched your search

+2 -33
View File
@@ -28,42 +28,11 @@ apt:
write_files:
# The configuration file. Created here before the package is installed, so
# postinst leaves it alone.
- path: /etc/vpn-router/vpn-router.conf
- path: /etc/vpn-router/vpn-router.json
permissions: '0600'
owner: root:root
content: |
[general]
platform = ${platform}
mode = ${mode}
[interfaces]
external = ${external_interface}
internal = ${internal_interface}
[wan]
local_fqdn = ${fqdn}
local_id_mode = ${local_id_mode}
[local]
cidrs = ${local_cidrs}
int_addr = ${int_addr}
int_gateway_ip = ${int_gateway_ip}
[remote]
addrs = ${remote_addrs}
id = ${remote_id}
cidrs = ${remote_cidrs}
psk_b64 = ${psk_b64}
[p2s]
enabled = ${p2s_enabled}
address_pool = ${p2s_address_pool}
ca_name = ${p2s_ca_name}
[wireguard]
enabled = ${wg_enabled}
address = ${wg_address}
listen_port = ${wg_listen_port}
${jsonencode(config)}
package_update: true