Sophie

Sophie

distrib > Fedora > 13 > i386 > media > os > by-pkgid > 93c02eebaee9671fe8ce1800d14dd07c > files > 1

tmda-ofmipd-1.1.12-4.fc12.noarch.rpm

#!/bin/bash
#
# Startup script for the TMDA ofmipd server (SysV/RedHat style)
#
# If you are installing the init files by hand, you should copy the these
# files to the following locations:
#   contrib/tofmipd.init      -> /etc/rc.d/init.d/tofmipd
#   contrib/tofmipd.sysconfig -> /etc/sysconfig/tofmipd
#
# Then you must install the service by issuing the following command:
#   chkconfig --add tofmipd
#
# You can then start the service with the following command:
#   service tofmipd start
#
# chkconfig: - 87 13
# description: tofmipd is a server that allows tagging of outgoing mail \
#          for the TMDA system.
# processname: tofmipd
# pidfile: /var/run/tofmipd.pid
# config: /etc/sysconfig/tofmipd
### BEGIN INIT INFO
# Provides:          tofmipd
# Required-Start:    $local_fs $network
# Should-Start:
# Required-Stop:
# Default-Stop:      0 1 2 6
# Short-Description: Start tofmipd daemon
# Description:       tofmipd is a server that allow tagging of outgoing mail \
#                    for the TMDA system
### END INIT INFO

# Path to the script, server binary, and short-form for messages.
program=/usr/bin/tmda-ofmipd
progname=tofmipd
lockfile=/var/lock/subsys/tofmipd
pidfile=/var/run/tofmipd.pid
RETVAL=0

# Source function library.
. /etc/rc.d/init.d/functions

if [ -f /etc/sysconfig/$progname ]; then
        . /etc/sysconfig/$progname
fi

start() {
        echo -n $"Starting $progname: "
        daemon $program $OPTIONS
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch $lockfile
        return $RETVAL
}
stop() {
        echo -n $"Stopping $progname: "
        killproc $program
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && rm -f $lockfile $pidfile
}

# See how we were called.
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  status)
        status $program
        RETVAL=$?
        ;;
  restart|reload)
        stop
        start
        RETVAL=$?
        ;;
  condrestart)
        if [ -f $pidfile ] ; then
                stop
                start
                RETVAL=$?
        fi
        ;;
  *)
        echo $"Usage: $progname {start|stop|restart|condrestart|status}"
        RETVAL=3
esac

exit $RETVAL