Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 4cc17e81e105c4621a7731b7cb759080 > files > 3

tmda-1.1.12-5.fc14.src.rpm

--- tmda-1.1.12/contrib/tofmipd.init	2007-02-23 20:06:47.000000000 -0700
+++ tmda-1.1.12/contrib/tofmipd.init	2007-08-19 20:19:08.000000000 -0600
@@ -19,6 +19,16 @@
 # 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
@@ -39,42 +49,44 @@
         daemon $program $OPTIONS
         RETVAL=$?
         echo
-        [ $RETVAL = 0 ] && touch $lockfile
+        [ $RETVAL -eq 0 ] && touch $lockfile
         return $RETVAL
 }
 stop() {
-	echo -n $"Stopping $progname: "
-	killproc $program
-	RETVAL=$?
-	echo
-	[ $RETVAL = 0 ] && rm -f $lockfile $pidfile
+        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
-	;;
+        start
+        ;;
   stop)
-	stop
-	;;
+        stop
+        ;;
   status)
         status $program
-	RETVAL=$?
-	;;
+        RETVAL=$?
+        ;;
   restart|reload)
-	stop
-	start
-	;;
+        stop
+        start
+        RETVAL=$?
+        ;;
   condrestart)
-	if [ -f $pidfile ] ; then
-		stop
-		start
-	fi
-	;;
+        if [ -f $pidfile ] ; then
+                stop
+                start
+                RETVAL=$?
+        fi
+        ;;
   *)
-	echo $"Usage: $progname {start|stop|restart|condrestart|status}"
-	exit 1
+        echo $"Usage: $progname {start|stop|restart|condrestart|status}"
+        RETVAL=3
 esac
 
 exit $RETVAL