root/trunk/init/op_panel_redhat.sh

Revision 37, 0.8 kB (checked in by root, 3 years ago)

Slight change to redhat init script in preparation of .spec

  • Property svn:executable set to
Line 
1 #!/bin/bash
2 #
3 # chkconfig: 2345 99 15
4 # description: Flash Operator Panel
5 # processname: op_server.pl
6
7 # source function library
8 . /etc/rc.d/init.d/functions
9
10 DAEMON=/usr/local/fop/op_server.pl
11 OPTIONS="-d -c /etc/asterisk/fop"
12 RETVAL=0
13
14 case "$1" in
15   start)
16         echo -n "Starting Flash Operator Panel: "
17         daemon $DAEMON $OPTIONS
18         RETVAL=$?
19         echo
20         [ $RETVAL -eq 0 ] && touch /var/lock/subsys/op_server.pl
21         ;;
22   stop)
23         echo -n "Shutting dows Flash Operator Panel: "
24         killproc op_server.pl
25         RETVAL=$?
26
27         echo
28         [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/op_server.pl
29         ;;
30   restart)
31         $0 stop
32         $0 start
33         RETVAL=$?
34         ;;
35   reload)
36         echo -n "Reloading Flash Operator Panel configuration: "
37         killproc op_server.pl -HUP
38         RETVAL=$?
39         echo
40         ;;
41   status)
42         status op_server.pl
43         RETVAL=$?
44         ;;
45   *)
46         echo "Usage: op_panel {start|stop|status|restart|reload}"
47         exit 1
48 esac
49
50 exit $RETVAL
51
Note: See TracBrowser for help on using the browser.