Fixed syntax of persist option for ovpn 2.1.
authorMarcus Scholz <commander1024@ipfire.org>
Sun, 6 Sep 2009 11:51:21 +0000 (13:51 +0200)
committerMarcus Scholz <commander1024@ipfire.org>
Sun, 6 Sep 2009 11:51:21 +0000 (13:51 +0200)
config/rootfiles/core/31/update.sh
html/cgi-bin/ovpnmain.cgi

index 48afaa9..1c9c9a1 100644 (file)
@@ -125,13 +125,13 @@ if [ ! -x "/var/ipfire/ovpn/server.conf" ]; then
 fi
 
 if [ ! -x "/var/ipfire/ovpn/server.conf" ]; then
-       grep -q "ipp-persist" /var/ipfire/ovpn/server.conf \
-       || echo "ipp-persist /var/ipfire/ovpn/ovpn-leases.db" >> /var/ipfire/ovpn/server.conf
+       grep -q "ifconfig-pool-persist" /var/ipfire/ovpn/server.conf \
+       || echo "ifconfig-pool-persist /var/ipfire/ovpn/ovpn-leases.db 3600" >> /var/ipfire/ovpn/server.conf
 fi
 
 if [ ! -x "/var/ipfire/ovpn/ovpn-leases.db" ]; then
        touch /var/ipfire/ovpn/ovpn-leases.db
-       chmod 700 /var/ipfire/ovpn/ovpn-leases.db
+       chmod 600 /var/ipfire/ovpn/ovpn-leases.db
        chown nobody:nobody /var/ipfire/ovpn/ovpn-leases.db
 fi
 #
index b982ee9..3bbcf1c 100644 (file)
@@ -320,7 +320,7 @@ sub writeserverconf {
     print CONF "proto $sovpnsettings{'DPROTOCOL'}\n";
     print CONF "port $sovpnsettings{'DDEST_PORT'}\n";
     print CONF "script-security 3 system\n";
-    print CONF "ipp-persist /var/ipfire/ovpn/ovpn-leases.db\n";
+    print CONF "ifconfig-pool-persist /var/ipfire/ovpn/ovpn-leases.db 3600\n";
     print CONF "tls-server\n";
     print CONF "ca /var/ipfire/ovpn/ca/cacert.pem\n";
     print CONF "cert /var/ipfire/ovpn/certs/servercert.pem\n";