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 48afaa9bdcfe5894b2514e02b8778a90371d9053..1c9c9a129be3449f13016d5890053408823c7d37 100644 (file)
@@ -125,13 +125,13 @@ if [ ! -x "/var/ipfire/ovpn/server.conf" ]; then
 fi
 
 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
 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
 #
        chown nobody:nobody /var/ipfire/ovpn/ovpn-leases.db
 fi
 #
index b982ee99ae6b277a4da7747b87cfa29f7bfa7989..3bbcf1ca1642ac577bba397264b12bb2886a5a96 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 "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";
     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";