Tizen 2.1 base
[platform/upstream/lsb.git] / test / minid.initd
1 #!/bin/sh
2 ### BEGIN INIT INFO
3 # Provides:          svnd
4 # Required-Start:    $syslog $remote_fs
5 # Should-Start: $time ypbind sendmail
6 # Required-Stop:     $syslog $remote_fs
7 # Should-Stop: $time ypbind sendmail
8 # Default-Start:     3 5
9 # Default-Stop:      0 1 2 6
10 # Short-Description: The daemon
11 # Description:       a cool daemon
12 ### END INIT INFO
13 # chkconfig: 345 99 00
14 # description: a cool daemon
15
16
17 DAEMON="/tmp/minid.pl"
18
19 PARA=" "
20 . /lib/lsb/init-functions
21
22 case "$1" in
23    start)
24        echo -n "Starting $DAEMON "
25        start_daemon $DAEMON $PARA
26        RETVAL=$?
27        ;;
28    stop)
29        echo -n "Shutting down $DAEMON "
30        killproc $DAEMON -TERM
31        RETVAL=$?
32        ;;
33    restart)
34        $0 stop
35        $0 start
36        ;;
37    status)
38        echo -n "Checking for service $DAEMON "
39        pidofproc $DAEMON 2>&1 >/dev/null
40        RETVAL=$?
41        ;;
42    *)
43        echo "Usage: $0 {start|stop|restart|status}"
44        exit 1
45        ;;
46 esac
47
48 if [ "x$RETVAL" = "x0" ] ; then
49   log_success_msg
50  else
51   log_failure_msg
52 fi