]> git.pld-linux.org Git - packages/fetchmail.git/blobdiff - fetchmail.init
- updated to 5.8.11.
[packages/fetchmail.git] / fetchmail.init
index eaed2dcea78ed4591f4faed7f6ba6bbaad01c271..987f78de17388dfa287ced5614543f20d0d8d4dd 100644 (file)
@@ -6,6 +6,7 @@
 #
 # config:      /etc/fetchmailrc
 
+
 # Source function library.
 . /etc/rc.d/init.d/functions
 
 # Get service config - may override defaults
 [ -f /etc/sysconfig/fetchmail ] && . /etc/sysconfig/fetchmail
 
+# defaults
+[ -z "$POLL_INTERVAL" ] && POLL_INTERVAL=300
+
+# Get network config
+[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network
+
 # Check that networking is up.
 if is_no "${NETWORKING}"; then
-       # nls "ERROR: Networking is down. %s can't be run." <service>
-       msg_Network_Down <service>
+       msg_Network_Down "fetchmail"
        exit 1
 fi
 
@@ -27,25 +33,25 @@ fi
 case "$1" in
   start)
        if [ ! -f /var/lock/subsys/fetchmail ]; then
-               # show "Starting %s service." fetchmail
-               msg_starting fetchmail
-               daemon fetchmail
+               msg_starting "fetchmail"
+
+               is_yes $VERBOSE_LOGGING && OPTIONS="-v"
+
+               daemon fetchmail -d "$POLL_INTERVAL" $OPTIONS -f /etc/fetchmailrc
                RETVAL=$?
                [ $RETVAL -eq 0 ] && touch /var/lock/subsys/fetchmail
        else
-               # show "%s service is already running." fetchmail
                msg_Already_Running fetchmail
                exit 1
        fi
         ;;
   stop)
-       if [ -f /var/lock/subsys/syslogd ]; then
-               msg_stopping fetchmail
+       if [ -f /var/lock/subsys/fetchmail ]; then
+               msg_stopping "fetchmail"
                killproc fetchmail
                rm -f /var/lock/subsys/fetchmail >/dev/null 2>&1
        else
-               # show "%s service is not running." fetchmail
-               msg_Not_Running fetchmail
+               msg_Not_Running "fetchmail"
                exit 1
        fi      
         ;;
@@ -55,8 +61,7 @@ case "$1" in
         ;;
   reload)
        if [ -f /var/lock/subsys/fetchmail ]; then
-               msg_show fetchmail
-               msg_reload
+               msg_reloading "fetchmail"
                busy
                killproc fetchmail -HUP
                deltext
This page took 0.034387 seconds and 4 git commands to generate.