From c8fc6dc37dd159330882a65bed848db7f6f5b3de Mon Sep 17 00:00:00 2001 From: stan Date: Tue, 24 Dec 2002 12:43:38 +0000 Subject: [PATCH] Fixed loggin. git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@219 e3e1d417-86f3-4887-817a-d78f3d33393f --- scripts/zmaudit.pl.z | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/zmaudit.pl.z b/scripts/zmaudit.pl.z index 01ff266ed..d55bdd6c7 100755 --- a/scripts/zmaudit.pl.z +++ b/scripts/zmaudit.pl.z @@ -39,7 +39,7 @@ use constant DB_NAME => "zm"; use constant DB_USER => "zmadmin"; use constant DB_PASS => "zmadminzm"; use constant EVENT_PATH => "/data/zm/events"; -use constant AUDIT_LOG_FILE => '/tmp/zmaudit.log'; +use constant LOG_FILE => '/tmp/zmaudit.log'; # ========================================================================== # @@ -129,9 +129,9 @@ if ( !$yes && !$report ) { ReadMode( 'cbreak' ); } -if ( !$delay ) # Background mode +if ( $delay ) # Background mode { - open( LOG, ">>".AUDIT_LOG_FILE ) or die( "Can't open log file: $!" ); + open( LOG, ">>".LOG_FILE ) or die( "Can't open log file: $!" ); open( STDOUT, ">&LOG" ) || die( "Can't dup stdout: $!" ); select( STDOUT ); $| = 1; open( STDERR, ">&LOG" ) || die( "Can't dup stderr: $!" );