[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [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 made 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/
>
> Why do you move the logs to /var/tmp?
Because I don't wanna look at 20 different <name>.bak files
when debuging.
> > 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
>
> Try to insert "set -x" somewhere above to see what actually
> happens in the shell script.
Let's try it.
> Maybe "$PID" expands to something wrong.
I inserted "echo $PID" and it returned to correct value.
Anyways, this script used to work just fine on my previous
setup, which is what puzzles me.
--
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