#!/bin/sh # # chkconfig: - 91 35 # description: Starts and stops the fetchmail daemon used to retrive mail \ # via various protocols (such as POP3 and IMAP4). # # config: /etc/fetchmailrc # Source function library. . /etc/init.d/functions # Source networking configuration. # Check that networking is up. SourceIfNotEmpty /etc/sysconfig/network && [ "$NETWORKING" != no ] || exit # until better times when localized logs are generally readable... LC_MESSAGES=C # Check that fetchmail exists. [ -x /usr/bin/fetchmail ] || exit LOCKFILE=/var/lock/subsys/fetchmail RETVAL=0 start() { UID_MIN=`grep -s ^UID_MIN /etc/login.defs |head -1 |awk '{print $2}'` [ -n "$UID_MIN" ] || UID_MIN=500 IFS=: awk -F: -v "uid_min=$UID_MIN" \ '{if ($3>=uid_min) printf "%s:%s\n", $1, $6}'