On Wed, Nov 9, 2011 at 03:11, James <[email protected]> wrote:
>> /etc/cron.d/mrtg changed:
>> */5 * * * * root if [ -x /usr/bin/mrtg ] && [ -r /etc/mrtg.cfg ] && [
>> -d "$(grep -v '^#' /etc/mrtg.cfg | grep WorkDir | cut
>> -d' ' -f2)" ]; then mkdir -p /var/log/mrtg ; env LANG=C /usr/bin/mrtg
>> /etc/mrtg.cfg 2>&1 | tee -a /var/log/mrtg/mrtg.log ; fi
>
> Also should be able to use
>
> grep ^WorkDir /etc/mrtg.cfg
>
> instead of
>
> grep -v '^#' /etc/mrtg.cfg | grep WorkDir
Sure, so one writes
WorkDir <path/to/dir>
and it won't get recognized...
--
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]