[prev in list] [next in list] [prev in thread] [next in thread]
List: jffnms-users
Subject: [jffnms-users] nightly cron cleanup failed
From: Heitzso <heitzso () bellsouth ! net>
Date: 2003-10-19 18:52:14
[Download RAW message or body]
Hi,
I just installed jffnms yesterday on a debian unstable
x386 arch system.
This morning I caught the following cron complaint:
/etc/cron.daily/jffnms:
find: paths must precede expression
Usage: find [path...] [expression]
run-parts: /etc/cron.daily/jffnms exited with return code 1
The cron.daily entry that contains the find commands (partial) is:
=====================================
IMAGEPATH=`cat /etc/jffnms/config.ini 2>/dev/null | perl -e 'while
(<>) { if ($_ =~ /^\s*images_real_path\s*=\s*(\S+)/) { print "$1\n";
exit 0; }}'`
if [ -z $IMAGEPATH ]; then
echo "images_real_path not found in jffnms configuration file config.ini"
return
fi
# Delete any .png .dot and .map files older than a day
find $IMAGEPATH -type f -mtime +1 regex '.*\.\(png\|dot\|map\)$'
-exec rm {} \;
}
deloldlogs()
{
# Find the log directory out of configuration file
LOGPATH=`cat /etc/jffnms/config.ini 2>/dev/null | perl -e 'while
(<>) { if ($_ =~ /^\s*log_path\s*=\s*(\S+)/) { print "$1\n"; exit 0; }}'`
if [ -z $LOGPATH ]; then
echo "log_path not found in jffnms configureation file config.ini."
return
fi
# Compress logs older than 2 days
if [ -z $COMPRESSLOGS ]; then
COMPRESSLOGS=2
fi
# Delete logs older than 7 days
if [ -z $DELETELOGS ]; then
DELETELOGS=7
fi
find $LOGPATH -type f -mtime +$DELETELOGS -exec rm {} \;
for fname in `find $LOGPATH -mtime +$COMPRESSLOGS -name '*.log'` ; do
gzip $fname
done
}
================================
my /etc/jffnms/config.ini has:
log_path = /var/log/jffnms
images_real_path = /var/lib/jffnms/tempimages
both of which exist and are real directories
I'm not a perl wizard so will let someone who lives and
breaths perl parse out where the glitch is
Thanks,
Heitzso
-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise
Linux in the Boardroom; in the Front Office; & in the Server Room
http://www.enterpriselinuxforum.com
_______________________________________________
jffnms-users mailing list
jffnms-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jffnms-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic