Need script to count earthquakes

I am trying to run this in mrtg in cron. I am getting this error data and this does not appear to be running properly. I am using webmin to set up the cron job.

Code:
2013-05-18 19:51:27: WARNING: Could not get any data from external command '/usr/local/etc/mrtg/eq.imo.sh'
Maybe the external command did not even start. (Illegal seek)

2013-05-18 19:51:27: WARNING: Problem with External get '/usr/local/etc/mrtg/eq.imo.sh':
   Expected a Number for 'in' but nothing'

2013-05-18 19:51:27: WARNING: Problem with External get '/usr/local/etc/mrtg/eq.imo.sh':
   Expected a Number for 'out' but nothing'

2013-05-18 19:51:27: ERROR: Target[localhost_eq][_IN_] ' $target->[0]{$mode} ' did not eval into defined data
2013-05-18 19:51:27: ERROR: Target[localhost_eq][_OUT_] ' $target->[0]{$mode} ' did not eval into defined data

I do not have any clue on what might be the issue, as the script runs normally when I run it from the shell.

Thanks for the help.
 
This has been solved. I added this top of my scripts and that made them start working properly.

Code:
PATH="/usr/local/bin:/usr/bin:/bin"
 
Back
Top