Subversion Repositories SmartDukaan

Rev

Rev 3905 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3905 Rev 4700
Line 14... Line 14...
14
 
14
 
15
# Do NOT "set -e"
15
# Do NOT "set -e"
16
 
16
 
17
# PATH should only include /usr/* if it runs after the mountnfs.sh script
17
# PATH should only include /usr/* if it runs after the mountnfs.sh script
18
PATH=/sbin:/usr/sbin:/bin:/usr/bin
18
PATH=/sbin:/usr/sbin:/bin:/usr/bin
19
PROJECT_DIR="/root/code/trunk"
19
PROJECT_DIR="/usr/local/lib/python2.6/dist-packages/PyProj-0.1-py2.6.egg"
20
LOGDIR="${PROJECT_DIR}/runutils"
-
 
21
export PYTHONPATH=${PROJECT_DIR}/PyProj/src:${PROJECT_DIR}/ThriftConfigPy/src:/usr/lib/pymodules/python2.6:/usr/lib/pymodules/python2.6/gtk-2.0:/usr/lib/python2.6:/usr/lib/python2.6/dist-packages:/usr/lib/python2.6/dist-packages/PIL:/usr/lib/python2.6/dist-packages/gst-0.10:/usr/lib/python2.6/dist-packages/gtk-2.0:/usr/lib/python2.6/lib-dynload:/usr/lib/python2.6/lib-old:/usr/lib/python2.6/lib-tk:/usr/lib/python2.6/plat-linux2:/usr/local/lib/python2.6/dist-packages:/usr/local/lib/python2.6/dist-packages/Elixir-0.7.1-py2.6.egg:/usr/local/lib/python2.6/dist-packages/TracXMLRPC-0.1-py2.6.egg:/usr/local/lib/python2.6/dist-packages/tornado-1.0.1-py2.6.egg
20
export PYTHONPATH=${PROJECT_DIR}:/usr/lib/pymodules/python2.6:/usr/lib/pymodules/python2.6/gtk-2.0:/usr/lib/python2.6:/usr/lib/python2.6/dist-packages:/usr/lib/python2.6/dist-packages/PIL:/usr/lib/python2.6/dist-packages/gst-0.10:/usr/lib/python2.6/dist-packages/gtk-2.0:/usr/lib/python2.6/lib-dynload:/usr/lib/python2.6/lib-old:/usr/lib/python2.6/lib-tk:/usr/lib/python2.6/plat-linux2:/usr/local/lib/python2.6/dist-packages:/usr/local/lib/python2.6/dist-packages/Elixir-0.7.1-py2.6.egg:/usr/local/lib/python2.6/dist-packages/TracXMLRPC-0.1-py2.6.egg:/usr/local/lib/python2.6/dist-packages/tornado-1.0.1-py2.6.egg
22
DESC="Content server used by the catalog dashboard"
21
DESC="Content server used by the catalog dashboard"
23
NAME="content-server"
22
NAME="content-server"
24
PIDFILE=/var/run/$NAME.pid
23
PIDFILE=/var/run/$NAME.pid
25
DAEMON=/usr/bin/python2.6
24
DAEMON=/usr/bin/python2.6
26
SCRIPTNAME=/etc/init.d/$NAME
25
SCRIPTNAME=/etc/init.d/$NAME
Line 45... Line 44...
45
{
44
{
46
	# Return
45
	# Return
47
	#   0 if daemon has been started
46
	#   0 if daemon has been started
48
	#   1 if daemon was already running
47
	#   1 if daemon was already running
49
	#   2 if daemon could not be started
48
	#   2 if daemon could not be started
50
        $DAEMON -u ${PROJECT_DIR}/PyProj/src/shop2020/content/main/ContentServer.py -l /var/log/services/content.log -i $PIDFILE start 
49
        $DAEMON -u ${PROJECT_DIR}/shop2020/content/main/ContentServer.py -l /var/log/services/content.log -i $PIDFILE start 
51
	# Add code here, if necessary, that waits for the process to be ready
50
	# Add code here, if necessary, that waits for the process to be ready
52
	# to handle requests from services started subsequently which depend
51
	# to handle requests from services started subsequently which depend
53
	# on this one.  As a last resort, sleep for some time.
52
	# on this one.  As a last resort, sleep for some time.
54
}
53
}
55
 
54
 
Line 61... Line 60...
61
	# Return
60
	# Return
62
	#   0 if daemon has been stopped
61
	#   0 if daemon has been stopped
63
	#   1 if daemon was already stopped
62
	#   1 if daemon was already stopped
64
	#   2 if daemon could not be stopped
63
	#   2 if daemon could not be stopped
65
	#   other if a failure occurred
64
	#   other if a failure occurred
66
        $DAEMON -u ${PROJECT_DIR}/PyProj/src/shop2020/content/main/ContentServer.py -l /var/log/services/content.log -i $PIDFILE stop
65
        $DAEMON -u ${PROJECT_DIR}/shop2020/content/main/ContentServer.py -l /var/log/services/content.log -i $PIDFILE stop
67
	RETVAL="$?"
66
	RETVAL="$?"
68
	[ "$RETVAL" = 1 ] && return 2
67
	[ "$RETVAL" = 1 ] && return 2
69
	# Wait for children to finish too if this is a daemon that forks
68
	# Wait for children to finish too if this is a daemon that forks
70
	# and if the daemon is only ever run from this initscript.
69
	# and if the daemon is only ever run from this initscript.
71
	# If the above conditions are not satisfied then add some other code
70
	# If the above conditions are not satisfied then add some other code