]> git.pld-linux.org Git - packages/courier-imap.git/blame - courier-imap-pop3.init
- make -j1 is required or it will fail to build, release 1
[packages/courier-imap.git] / courier-imap-pop3.init
CommitLineData
1986fe76 1#!/bin/sh
0e7557ae 2# POP3 Daemon
1986fe76 3#
4# chkconfig: 345 80 20
0e7557ae 5# description: POP3 Daemon
1986fe76 6
7efa8e76
AA
7sysconfdir=@sysconfdir@
8libexecdir=@libexecdir@
9sbindir=@sbindir@
dc7a4eaf 10
1986fe76 11# Source function library
12. /etc/rc.d/init.d/functions
13
14# Get network config
15. /etc/sysconfig/network
16
1986fe76 17# Check that networking is up.
0838e112 18if is_yes "${NETWORKING}"; then
ac84c9b5 19 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
0838e112 20 msg_network_down "Courier POP3"
21 exit 1
22 fi
23else
24 exit 0
1986fe76 25fi
26
d5f9e77f 27RETVAL=0
1986fe76 28# See how we were called.
29case "$1" in
862484de 30start)
1986fe76 31 # Check if the service is already running?
0e7557ae 32 if [ ! -f /var/lock/subsys/courier-pop3 ]; then
05b6dd04 33 msg_starting pop3d
862484de 34 daemon $libexecdir/pop3d.rc start
05b6dd04
AM
35 RETVAL=$?
36 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/courier-pop3
1986fe76 37 else
862484de 38 msg_already_running pop3d
1986fe76 39 fi
862484de
ER
40;;
41stop)
0e7557ae 42 if [ -f /var/lock/subsys/courier-pop3 ]; then
862484de
ER
43 msg_stopping pop3d
44 daemon $libexecdir/pop3d.rc stop
45 RETVAL=$?
05b6dd04 46 rm -f /var/lock/subsys/courier-pop3 >/dev/null 2>&1
1986fe76 47 else
862484de 48 msg_not_running pop3d
1986fe76 49 fi
862484de
ER
50;;
51restart|force-reload)
1986fe76 52 $0 stop
53 $0 start
d5f9e77f 54 exit $?
1986fe76 55 ;;
862484de 56status)
1986fe76 57 status couriertcpd
d5f9e77f 58 exit $?
1986fe76 59 ;;
862484de 60*)
d5f9e77f 61 msg_usage "$0 {start|stop|restart|force-reload|status}"
62 exit 3
1986fe76 63esac
64
65exit $RETVAL
This page took 0.034227 seconds and 4 git commands to generate.