Still trying to get my script (to send text format output to a remote
syslogd) to run under "cron"
This is FireWall-1 4.1.2 running on a NOKIA IP440 with IPSO v3.3
Several people suggested I should fully qualify the path of the "fw log"
commands in my script, but (see below) this did not work either.
Here is what I have.............
IN CRONTAB : (PATH edited to include /var where script resides)
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/var
HOME=/var/log
MAILTO=""
#
#minute hour mnthday month weekday user command
#
48 * * * * root /var/logjam 2>&1 >>/var/logrec
5 * * * * root /etc/hourly 2>&1 >>/var/log/hourly
30 3 * * 6 root /etc/weekly 2>&1 >>/var/log/weekly
0 2 * * * root /etc/daily 2>&1 >>/var/log/daily
30 5 1 * * root /etc/monthly 2>&1 >>/var/log/monthly
SCRIPT (extract) :
LOGVAR=$(cat $LOGTRK)
export LOGVAR
/opt/FireWall-1-strong.v4.1.SP-3.ipso-3.3/fw40/bin/fw log -s 00:00:00 | logger -p
local5.emerg &
(tried these as well !)
# fw log -s 00:00:00 | logger -p local5.emerg
# fw log -s ${LOGVAR} | logger -p local5.emerg &
KIWI LOGD :
when script is run from "cron" ....
06-29-2001 16:52:50 Cron.Info 10.32.1.2 Jun 29 15:48:00
[LOG_INFO] /USR/SBIN/CRON[18240]: (root) CMD (/var/logjam 2>&1
>>/var/logrec)
06-29-2001 16:52:50 Cron.Info 10.32.1.2 Jun 29 15:48:00
[LOG_INFO] /usr/sbin/cron[343]: (*system*) RELOAD (/etc/crontab)
06-29-2001 16:52:50 Daemon.Debug 10.32.1.2 Jun 29 15:47:19 last message
repeated 6 times
when script is run manually ( ./logjam ) .....
06-29-2001 16:50:44 Local5.Emerg 10.32.1.2 Jun 29 15:45:49 [LOG_EMERG]
admin: 6:54:00 drop www.fw1.com >eth-s1p1c0 proto icmp src
another dst www.fw1.com rule 2 icmp-type 3 icmp-code 3
06-29-2001 16:50:44 Local5.Emerg 10.32.1.2 Jun 29 15:45:49 [LOG_EMERG]
admin: 3:05:00 accept www.fw1.com <eth-s1p1c0 proto udp src
www.fw1.com dst another service syslog s_port syslog len 78 rule 0
06-29-2001 16:50:43 Local5.Emerg 10.32.1.2 Jun 29 15:45:49 [LOG_EMERG]
admin: 2:57:11 accept www.fw1.com <eth-s1p1c0 proto udp src
www.fw1.com dst another service syslog s_port syslog len 78 rule 0
06-29-2001 16:50:43 Local5.Emerg 10.32.1.2 Jun 29 15:45:49 [LOG_EMERG]
admin: 2:55:11 accept www.fw1.com <eth-s1p1c0 proto udp src
www.fw1.com dst another service syslog s_port syslog len 77 rule 0
etc etc ....
Can anyone tell me why the "FW LOG ...." commands do not run when the script is
actioned by "cron" ???
Many thanks,
Gordon
_______________________________________________
Firewalls mailing list
[EMAIL PROTECTED]
http://lists.gnac.net/mailman/listinfo/firewalls