From 36c3e054ac5e6f74899b05b799f2a4304be74cf9 Mon Sep 17 00:00:00 2001 From: Tim Wilkinson Date: Wed, 9 Mar 2022 13:34:33 -0800 Subject: [PATCH] Dont truncate /etc/config/vtun on tunnel install (#275) --- files/www/cgi-bin/vpn | 2 +- files/www/cgi-bin/vpnc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/www/cgi-bin/vpn b/files/www/cgi-bin/vpn index 69030e5a..05f9d02e 100755 --- a/files/www/cgi-bin/vpn +++ b/files/www/cgi-bin/vpn @@ -179,7 +179,7 @@ function install_vtun() os.execute("cat /etc/config.mesh/network_tun >> /etc/config.mesh/network") os.execute("cat /etc/config.mesh/network_tun >> /etc/config/network") - io.open("/etc/config/vtun", "w"):close() + io.open("/etc/config/vtun", "a"):close() cursor:add("vtun", "options") cursor:add("vtun", "network") cursor:commit("vtun") diff --git a/files/www/cgi-bin/vpnc b/files/www/cgi-bin/vpnc index 69275837..0237472c 100755 --- a/files/www/cgi-bin/vpnc +++ b/files/www/cgi-bin/vpnc @@ -164,7 +164,7 @@ function install_vtun() os.execute("cat /etc/config.mesh/network_tun >> /etc/config.mesh/network") os.execute("cat /etc/config.mesh/network_tun >> /etc/config/network") - io.open("/etc/config/vtun", "w"):close() + io.open("/etc/config/vtun", "a"):close() cursor:add("vtun", "options") cursor:add("vtun", "network") cursor:commit("vtun")