#!/bin/sh ## ## kolab -- startup/shutdown transfer script for OpenPKG /kolab hierarchy ## [ ! -f /kolab/etc/rc ] && exit 0 PRGNAME=$(basename $0) case $PRGNAME in S*) mode=start ;; K*) mode=stop ;; *) mode=$1 esac case $mode in start) ( while ! ps x | grep -q po[s]tfix; do sleep 10 done /usr/bin/fetchmail -s -d 180 \ -f /etc/fetchmailrc -L /var/log/kolab-fetchmail ) & exec /kolab/etc/rc all start # Fetchmail is not started when it is executed from here. Hence # the code above :( ;; stop) /usr/bin/fetchmail -quit exec /kolab/etc/rc all stop ;; status) exec /kolab/etc/rc all status ;; esac