]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/urlfilter.cgi
Ein Paar Dateien fuer die GPLv3 angepasst.
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / urlfilter.cgi
index 538569b7b704ee50b0e08776c4d9f582b31df4bc..6594022bf804d7e0da21bad3a44b587584aadb34 100644 (file)
@@ -1,17 +1,29 @@
 #!/usr/bin/perl
-#
-# This code is distributed under the terms of the GPL
-#
-# (c) 2004-2007 marco.s - http://www.urlfilter.net
-#
-# $Id: urlfilter.cgi,v 1.9.1 2007/03/22 00:00:00 marco.s Exp $
-#
+###############################################################################
+#                                                                             #
+# 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 strict;
 
 # enable only the following on debugging purpose
-use warnings;
-use CGI::Carp 'fatalsToBrowser';
+#use warnings;
+#use CGI::Carp 'fatalsToBrowser';
 
 use File::Copy;
 use IO::Socket;
@@ -369,7 +381,7 @@ if (($filtersettings{'ACTION'} eq $Lang::tr{'save'}) ||
 
                &setpermissions ($dbdir);
 
-               system('/usr/local/bin/restartsquid');
+               system('/usr/local/bin/squidctrl restart >/dev/null 2>&1');
        }
 }
 
@@ -503,7 +515,7 @@ if (($tcsettings{'MODE'} eq 'TIMECONSTRAINT') && ($tcsettings{'ACTION'} eq $Lang
                $errormessage = $Lang::tr{'urlfilter web proxy service required'};
        }
 
-       if (!$errormessage) { system('/usr/local/bin/restartsquid'); }
+       if (!$errormessage) { system('/usr/local/bin/squidctrl restart >/dev/null 2>&1'); }
        $tcsettings{'TCMODE'}='on';
 }
 
@@ -706,7 +718,7 @@ if (($uqsettings{'MODE'} eq 'USERQUOTA') && ($uqsettings{'ACTION'} eq $Lang::tr{
                $errormessage = $Lang::tr{'urlfilter web proxy service required'};
        }
 
-       if (!$errormessage) { system('/usr/local/bin/restartsquid'); }
+       if (!$errormessage) { system('/usr/local/bin/squidctrl restart >/dev/null 2>&1'); }
        $uqsettings{'UQMODE'}='on';
 }
 
@@ -960,7 +972,7 @@ if (($besettings{'ACTION'} eq $Lang::tr{'urlfilter install blacklist'}) && ($bes
 
                &writeconfigfile;
 
-               system('/usr/local/bin/restartsquid') unless ($besettings{'NORESTART'} eq 'on');
+               system('/usr/local/bin/squidctrl restart >/dev/null 2>&1') unless ($besettings{'NORESTART'} eq 'on');
 
                if (-d $editdir) { system("rm -rf $editdir"); }
        } else {