source: trunk/init/samhain.startIRIX.in@ 496

Last change on this file since 496 was 1, checked in by katerina, 19 years ago

Initial import

File size: 1.1 KB
RevLine 
[1]1#! /bin/sh
2
3
4PATH=/usr/sbin:/usr/bin:/sbin
5export PATH
6
7rval=0
8
9DAEMON=@sbindir@/@install_name@
10NAME=@install_name@
11
12if /sbin/chkconfig verbose; then
13 verbose=1
14else
15 verbose=0
16fi
17
18log_stat_msg () {
19case "$1" in
20 0)
21 echo "Service $NAME: Running";
22 break;
23 ;;
24 1)
25 echo "Service $NAME: Stopped and /var/run pid file exists";
26 break;
27 ;;
28 3)
29 echo "Service $NAME: Stopped";
30 break;
31 ;;
32 *)
33 echo "Service $NAME: Status unknown";
34 break;
35 ;;
36esac
37}
38
39case "$1" in
40
41 'start')
42 test $verbose = 1 && echo "Starting $NAME"
43 $DAEMON start
44 rval=$?
45 exit $rval
46 ;;
47
48 stop)
49 test $verbose = 1 && echo "Stopping $NAME"
50 $DAEMON stop
51 rval=$?
52 #
53 # Remove a stale lockfile, if found
54 #
55 if test -f @mylockfile@; then
56 /bin/rm -f @mylockfile@
57 fi
58 exit $rval
59 ;;
60
61 restart)
62 test $verbose = 1 && echo "Restarting $NAME"
63 $DAEMON restart
64 rval=$?
65 exit $rval
66 ;;
67
68 reload|force-reload)
69 test $verbose = 1 && echo "Reloading $NAME"
70 $DAEMON reload
71 rval=$?
72 exit $rval
73 ;;
74
75 status)
76 ${DAEMON} status
77 ERRNUM=$?
78 log_stat_msg ${ERRNUM}
79 exit ${ERRNUM}
80 ;;
81
82 *)
83 echo "Usage: @install_name@ {start|stop|restart|reload}"
84 exit 1
85 ;;
86esac
87
88exit $rval
Note: See TracBrowser for help on using the repository browser.