#!/bin/bash #This is mail exchange cron [ for RouterSys II ] #$Revision: 1.2 $ /usr/bin/test -r /root/.fetchmailrc || echo "FATAL: cannot read fetchmailrc" if ! /bin/ping 194.25.2.129 -c 1 -i 1 >/dev/null 2>&1 then /bin/sleep 10 fi if /bin/ping 194.25.2.129 -c 3 -i 1 >/dev/null 2>&1 then /usr/bin/fetchmail -a -f /root/.fetchmailrc --syslog \ 2>&1 | grep -v 'another foreground fetchmail is running' /bin/sleep 3 /usr/sbin/sendmail -q else host=`/bin/hostname -f` echo "##########################################################" echo "# ($0@${host}) " echo "# Verbindung fehlgeschlagen!!" echo "######################################" fi exit 0