wok view openerp-web/stuff/etc/init.d/openerp-web @ rev 8283

Up: xfce4-settings to 4.8.1.
author Christopher Rogers <slaxemulator@gmail.com>
date Sun Jan 30 15:48:33 2011 +0000 (2011-01-30)
parents
children b7f5000cceb9
line source
1 #!/bin/sh
2 # /etc/init.d/openerp-web : Start, stop and restart openerp-web server on SliTaz, at
3 # boot time or with the command line.
4 #
5 # To start openerp-web server at boot time, just put etiny in the $RUN_DAEMONS
6 # variable of /etc/rcS.conf and configure options with /etc/daemons.conf
7 #
8 . /etc/init.d/rc.functions
9 . /etc/daemons.conf
11 NAME=openerp-web
12 DESC="openerp-web server"
13 DAEMON=/usr/bin/start-openerp-web
14 OPTIONS=$OPENERP_WEB_OPTIONS
15 PIDFILE=/var/run/openerp-web.pid
16 [ -n "$OPTIONS" ] || OPTIONS="-c /etc/openerp/openerp-web.conf"
18 case "$1" in
19 start)
20 if [ -f $PIDFILE ] ; then
21 echo "$NAME already running."
22 exit 1
23 fi
24 echo -n "Starting $DESC: $NAME... "
25 $DAEMON $OPTIONS &
26 status
27 sleep 2 ;;
28 stop)
29 if [ ! -f $PIDFILE ] ; then
30 echo "$NAME is not running."
31 exit 1
32 fi
33 echo -n "Stopping $DESC: $NAME... "
34 kill `cat $PIDFILE`
35 status
36 sleep 2 ;;
37 restart)
38 if [ ! -f $PIDFILE ] ; then
39 echo "$NAME is not running."
40 exit 1
41 fi
42 echo -n "Restarting $DESC: $NAME... "
43 kill `cat $PIDFILE`
44 sleep 2
45 $DAEMON $OPTIONS &
46 status
47 sleep 2 ;;
48 *)
49 echo ""
50 echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]"
51 echo ""
52 exit 1 ;;
53 esac
55 exit 0