Subversion Repositories SmartDukaan

Rev

Rev 4909 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4909 Rev 5193
Line 15... Line 15...
15
 
15
 
16
# Do NOT "set -e"
16
# Do NOT "set -e"
17
 
17
 
18
# PATH should only include /usr/* if it runs after the mountnfs.sh script
18
# PATH should only include /usr/* if it runs after the mountnfs.sh script
19
PATH=/sbin:/usr/sbin:/bin:/usr/bin
19
PATH=/sbin:/usr/sbin:/bin:/usr/bin
20
PROJECT_DIR="/root/code/trunk"
20
PROJECT_DIR="/usr/local/lib/python2.6/dist-packages/PyProj-0.1-py2.6.egg"
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
21
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="Email Sender Service used to send mails"
22
DESC="Email Sender Service used to send mails"
23
NAME="email-sender"
23
NAME="email-sender"
24
PIDFILE=/var/run/$NAME.pid
24
PIDFILE=/var/run/$NAME.pid
25
DAEMON=/usr/bin/python2.6
25
DAEMON=/usr/bin/python2.6
26
SCRIPTNAME=/etc/init.d/$NAME
26
SCRIPTNAME=/etc/init.d/$NAME
Line 45... Line 45...
45
{
45
{
46
	# Return
46
	# Return
47
	#   0 if daemon has been started
47
	#   0 if daemon has been started
48
	#   1 if daemon was already running
48
	#   1 if daemon was already running
49
	#   2 if daemon could not be started
49
	#   2 if daemon could not be started
50
        $DAEMON -u ${PROJECT_DIR}/PyProj/src//shop2020/helpers/impl/EmailSender.py -l /var/log/utils/emailsender/emailsender.log -i $PIDFILE start 
50
        $DAEMON -u ${PROJECT_DIR}/shop2020/helpers/impl/EmailSender.py -l /var/log/services/emailsender.log -i $PIDFILE start 
51
	# Add code here, if necessary, that waits for the process to be ready
51
	# Add code here, if necessary, that waits for the process to be ready
52
	# to handle requests from services started subsequently which depend
52
	# to handle requests from services started subsequently which depend
53
	# on this one.  As a last resort, sleep for some time.
53
	# on this one.  As a last resort, sleep for some time.
54
}
54
}
55
 
55
 
Line 61... Line 61...
61
	# Return
61
	# Return
62
	#   0 if daemon has been stopped
62
	#   0 if daemon has been stopped
63
	#   1 if daemon was already stopped
63
	#   1 if daemon was already stopped
64
	#   2 if daemon could not be stopped
64
	#   2 if daemon could not be stopped
65
	#   other if a failure occurred
65
	#   other if a failure occurred
66
        $DAEMON -u ${PROJECT_DIR}/PyProj/src//shop2020/helpers/impl/EmailSender.py -l /var/log/utils/emailsender/emailsender.log -i $PIDFILE stop
66
        $DAEMON -u ${PROJECT_DIR}/shop2020/helpers/impl/EmailSender.py -l /var/log/services/emailsender.log -i $PIDFILE stop
67
	RETVAL="$?"
67
	RETVAL="$?"
68
	[ "$RETVAL" = 1 ] && return 2
68
	[ "$RETVAL" = 1 ] && return 2
69
	# Wait for children to finish too if this is a daemon that forks
69
	# 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.
70
	# and if the daemon is only ever run from this initscript.
71
	# If the above conditions are not satisfied then add some other code
71
	# If the above conditions are not satisfied then add some other code