]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/ovpnmain.cgi
Anpassungen am MPFire
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / ovpnmain.cgi
index 0b0d8cb0886d000da53ffe013f7f0eb9b6d8b9f8..746f7eece5aa95527a8994ccac2ade097417bf84 100644 (file)
@@ -1,11 +1,23 @@
 #!/usr/bin/perl
-# based on SmoothWall and IPCop CGIs
-# 
-# This code is distributed under the terms of the GPL
-# Main idea from zeroconcept
-# ZERNINA-VERSION:0.9.4i
-# (c) 2007 Ufuk Altinkaynak
-#
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2007  Michael Tremer & Christian Schmidt                      #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
 
 use CGI;
 use CGI qw/:standard/;
@@ -301,7 +313,7 @@ sub writeserverconf {
     print CONF "\n";
     print CONF "daemon openvpnserver\n";
     print CONF "writepid /var/run/openvpn.pid\n";
-    print CONF "#DAN prepare ZERINA for listening on blue and orange\n";
+    print CONF "#DAN prepare OpenVPN for listening on blue and orange\n";
     print CONF ";local $sovpnsettings{'VPN_IP'}\n";
     print CONF "dev $sovpnsettings{'DDEVICE'}\n";
     print CONF "$sovpnsettings{'DDEVICE'}-mtu $sovpnsettings{'DMTU'}\n";
@@ -576,6 +588,11 @@ if ($cgiparams{'ACTION'} eq $Lang::tr{'save'} && $cgiparams{'TYPE'} eq '' && $cg
     $vpnsettings{'DMTU'} = $cgiparams{'DMTU'};
     $vpnsettings{'DCOMPLZO'} = $cgiparams{'DCOMPLZO'};
     $vpnsettings{'DCIPHER'} = $cgiparams{'DCIPHER'};
+#wrtie enable
+
+  if ( $vpnsettings{'ENABLED_BLUE'} eq 'on' ) {system("touch ${General::swroot}/ovpn/enable_blue 2>/dev/null");}else{system("unlink ${General::swroot}/ovpn/enable_blue 2>/dev/null");}
+  if ( $vpnsettings{'ENABLED_ORANGE'} eq 'on' ) {system("touch ${General::swroot}/ovpn/enable_orange 2>/dev/null");}else{system("unlink ${General::swroot}/ovpn/enable_orange 2>/dev/null");}
+  if ( $vpnsettings{'ENABLED'} eq 'on' ) {system("touch ${General::swroot}/ovpn/enable 2>/dev/null");}else{system("unlink ${General::swroot}/ovpn/enable 2>/dev/null");}
 #new settings for daemon    
     &General::writehash("${General::swroot}/ovpn/settings", \%vpnsettings);
     &writeserverconf();#hier ok
@@ -2558,8 +2575,7 @@ END
     } else {
        $activeonrun = "disabled='disabled'";
     }  
-    &Header::openbox('100%', 'LEFT', $Lang::tr{'global settings'});
-       print "<div align='center'><strong>ZERINA-0.9.4i</strong></div>";       
+    &Header::openbox('100%', 'LEFT', $Lang::tr{'global settings'});    
     print <<END        
     <table width='100%'>
     <form method='post'>