выполняю его руками /usr/SCRIPTS/monitor.sh
весь скрипт нормально отрабатывает.
ставлю по крону нифига не срабатывает только $echo 111111 | $sendxmpp -s test admin@jabber.office.ru
а $echo test > /test.log срабатывает!
Вот данные:
Код: Выделить всё
#!/bin/sh
ping="/sbin/ping"
sendxmpp="/usr/local/bin/sendxmpp"
echo="/bin/echo"
$ping -q -c 4 192.168.0.233 > /dev/null 2>&1
if [ $? != 0 ]; then
$echo 111111 | $sendxmpp -s test admin@jabber.office.ru
$echo test > /test.log
exit 1;
fi
Код: Выделить всё
/usr/SCRIPTS/> ls -l | grep monitor
-rwxrwxrwx 1 root wheel 385 3 фев 17:55 monitor.sh
Код: Выделить всё
//> cat /etc/crontab | grep monitor
*/1 * * * * root /usr/SCRIPTS/monitor.sh /dev/null 2>&1
Код: Выделить всё
//>cat /root/.sendxmpprc
monitor@jabber.office:5222 pass
Код: Выделить всё
//> pkg_info | grep perl
perl-5.8.9_2 Practical Extraction and Report Language
Код: Выделить всё
//> pkg_info | grep sendxmpp
sendxmpp-0.0.8_1 Perl-script to send xmpp (jabber) messages
Может кто сталкивался ???