From 4caf0fcb8d1a7db1d5df786f9eb0e2ce42f2adc3 Mon Sep 17 00:00:00 2001 From: kkalev Date: Mon, 6 Oct 2003 15:18:40 +0000 Subject: [PATCH] Make clean_radacct and truncate_radacct work correctly --- Changelog | 1 + bin/clean_radacct | 4 ++-- bin/truncate_radacct | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Changelog b/Changelog index 8cc83b5..992cfe0 100644 --- a/Changelog +++ b/Changelog @@ -50,6 +50,7 @@ Ver 1.63: * Add more comments in the admin.conf file * Show correct calculation of the montlhy usage time. * Don't show an account as locked if Dialup-Access does not exist and the mapping corresponds to 'none' attribute +* Make clean_radacct and truncate_radacct work correctly Ver 1.62: * Remove one sql query from user_admin which was not needed. * Instead of a query like "LIKE 'YYYY-MM-DD%'" use "AcctStopTime >= 'YYYY-MM-DD 00:00:00 AND AcctStopTime diff --git a/bin/clean_radacct b/bin/clean_radacct index e89cf11..1bb228c 100755 --- a/bin/clean_radacct +++ b/bin/clean_radacct @@ -22,7 +22,7 @@ while(){ } close CONF; -$sql_password = ($sql_password == '') ? '' : "-p $sql_password"; +$sql_password = ($sql_password eq '') ? '' : "-p$sql_password"; ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime; $date = POSIX::strftime("%Y-%m-%d %T",$sec,$min,$hour,($mday - $back_days),$mon,$year,$wday,$yday,$isdst); @@ -34,4 +34,4 @@ open TMP, ">/tmp/clean_radacct.query" or die "Could not open tmp file\n"; print TMP $query; close TMP; -`$mysql -h $sql_server -u $sql_username $sql_password $sql_database ){ } close CONF; -$sql_password = ($sql_password == '') ? '' : "-p $sql_password"; +$sql_password = ($sql_password eq '') ? '' : "-p$sql_password"; ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime; $date = POSIX::strftime("%Y-%m-%d %T",$sec,$min,$hour,($mday - $back_days),$mon,$year,$wday,$yday,$isdst); @@ -36,4 +36,4 @@ open TMP, ">/tmp/truncate_radacct.query" or die "Could not open tmp file\n"; print TMP $query; close TMP; -`$mysql -h $sql_server -u $sql_username $sql_password $sql_database