]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/logs.cgi/config.dat
Added ability to change syslog to async logging.
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / logs.cgi / config.dat
index 6e82cf4f6f529f3916b2bc847270368ead14ac02..392edac3daf7bebf455022f9f4e1ea5c98eeda06 100644 (file)
@@ -1,10 +1,10 @@
 #!/usr/bin/perl
 #
-# IPCop CGIs
+# IPFire CGIs
 #
 # This code is distributed under the terms of the GPL
 #
-# (c) The IPCop Team
+# (c) The IPFire Team
 #
 # $Id: config.dat,v 1.2.2.10 2005/06/14 12:32:07 eoberlander Exp $
 #
@@ -15,7 +15,7 @@ use strict;
 #use warnings;
 #use CGI::Carp 'fatalsToBrowser';
 
-require 'CONFIG_ROOT/general-functions.pl';
+require '/var/ipfire/general-functions.pl';
 require "${General::swroot}/lang.pl";
 require "${General::swroot}/header.pl";
 
@@ -32,7 +32,9 @@ $logsettings{'LOGWATCH_LEVEL'} = 'Low';
 $logsettings{'LOGWATCH_KEEP'} = '56';
 my @VS = ('15','50','100','150','250','500');
 $logsettings{'ENABLE_REMOTELOG'} = 'off';
+$logsettings{'ENABLE_ASYNCLOG'} = 'off';
 $logsettings{'REMOTELOG_ADDR'} = '';
+$logsettings{'VARMESSAGES'} = 'cron.none;daemon.*;local0.*;local2.*;*.info;mail.none;authpriv.*';
 $logsettings{'ACTION'} = '';
 &Header::getcgihash(\%logsettings);
 
@@ -57,7 +59,7 @@ if ($logsettings{'ACTION'} eq $Lang::tr{'save'})
   unless ($errormessage)
   {
     &General::writehash("${General::swroot}/logging/settings", \%logsettings);
-    system('/usr/local/bin/restartsyslogd') == 0
+    system('/usr/local/bin/syslogdctrl') == 0
       or $errormessage = "$Lang::tr{'bad return code'} " . $?/256;
   }
 
@@ -65,6 +67,10 @@ if ($logsettings{'ACTION'} eq $Lang::tr{'save'})
 
 &General::readhash("${General::swroot}/logging/settings", \%logsettings);
 
+$checked{'ENABLE_ASYNCLOG'}{'off'} = '';
+$checked{'ENABLE_ASYNCLOG'}{'on'} = '';
+$checked{'ENABLE_ASYNCLOG'}{$logsettings{'ENABLE_ASYNCLOG'}} = "checked='checked'";
+
 $checked{'ENABLE_REMOTELOG'}{'off'} = '';
 $checked{'ENABLE_REMOTELOG'}{'on'} = '';
 $checked{'ENABLE_REMOTELOG'}{$logsettings{'ENABLE_REMOTELOG'}} = "checked='checked'";
@@ -145,7 +151,17 @@ END
 ;
 &Header::closebox();
 
-
+&Header::openbox('100%', 'left', $Lang::tr{'messages logging'});
+print <<END
+<table width='100%'>
+<tr>
+  <td class='base'>$Lang::tr{'enabled'}</td><td><input type='checkbox' name='ENABLE_ASYNCLOG' $checked{'ENABLE_ASYNCLOG'}{'on'} /></td>
+  <td>$Lang::tr{'log var messages'}</td><td><input type='text' name='VARMESSAGES' size='50' value='$logsettings{'VARMESSAGES'}' /></td>
+</tr>
+</table>
+END
+;
+&Header::closebox();
 
 print <<END
 <div align='center'>