[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MiNT] little bug (help!)
During the NMD build process, I'm trying to implement various
functionalities that were not found in KGMD. One of these is
log rotation. I have mae a little bourne script for this:
#!/bin/sh
#
# ROT_LOG.SH every Sunday @ 10:01
DATE=`date`
PID=`cat /var/run/syslog.pid`
echo "* * * * * Recycling system logs * * * * *" > /dev/log
mv /var/log/* /var/tmp/
touch /var/log/wtmp
touch /var/log/lastlog
echo -e "FTP log recycled on" $DATE". \n" > /var/log/ftp.log
sleep 1
kill -HUP $PID
# EoF
The problem I get is, "kill" fails from the script. The process
is reported as Terminated when it gets to that part. However,
the same command works from commandline.
Any ideas why it would fail?
--
Martin-Eric Racine http://www.pp.fishpool.fi/~q-funk/M-E/
The Atari TT030 Homepage http://funkyware.atari.org/TT030/
----------------------------------------------------------------
Intellitel Communications www.intellitel.com +358 (5) 624 3283