~ubuntu-virt/ubuntu/maverick/eucalyptus/2.0

422 by graziano
We use a master init.d script for the java ws and we generate the script
1
#!/bin/bash
444.1.69 by root
added license header to source files (not clc/)
2
#Copyright (c) 2009  Eucalyptus Systems, Inc.	
3
#
4
#This program is free software: you can redistribute it and/or modify
5
#it under the terms of the GNU General Public License as published by 
6
#the Free Software Foundation, only version 3 of the License.  
7
# 
8
#This file is distributed in the hope that it will be useful, but WITHOUT
9
#ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
#FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
11
#for more details.  
12
#
13
#You should have received a copy of the GNU General Public License along
14
#with this program.  If not, see <http://www.gnu.org/licenses/>.
15
# 
16
#Please contact Eucalyptus Systems, Inc., 130 Castilian
17
#Dr., Goleta, CA 93101 USA or visit <http://www.eucalyptus.com/licenses/> 
18
#if you need additional information or have any questions.
19
#
20
#This file may incorporate work covered under the following copyright and
21
#permission notice:
22
#
23
#  Software License Agreement (BSD License)
24
#
25
#  Copyright (c) 2008, Regents of the University of California
26
#  
27
#
28
#  Redistribution and use of this software in source and binary forms, with
29
#  or without modification, are permitted provided that the following
30
#  conditions are met:
31
#
32
#    Redistributions of source code must retain the above copyright notice,
33
#    this list of conditions and the following disclaimer.
34
#
35
#    Redistributions in binary form must reproduce the above copyright
36
#    notice, this list of conditions and the following disclaimer in the
37
#    documentation and/or other materials provided with the distribution.
38
#
39
#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
40
#  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
41
#  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
42
#  PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
43
#  OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
44
#  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
45
#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
46
#  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
47
#  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
48
#  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
49
#  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. USERS OF
50
#  THIS SOFTWARE ACKNOWLEDGE THE POSSIBLE PRESENCE OF OTHER OPEN SOURCE
51
#  LICENSED MATERIAL, COPYRIGHTED MATERIAL OR PATENTED MATERIAL IN THIS
52
#  SOFTWARE, AND IF ANY SUCH MATERIAL IS DISCOVERED THE PARTY DISCOVERING
53
#  IT MAY INFORM DR. RICH WOLSKI AT THE UNIVERSITY OF CALIFORNIA, SANTA
54
#  BARBARA WHO WILL THEN ASCERTAIN THE MOST APPROPRIATE REMEDY, WHICH IN
55
#  THE REGENTS’ DISCRETION MAY INCLUDE, WITHOUT LIMITATION, REPLACEMENT
56
#  OF THE CODE SO IDENTIFIED, LICENSING OF THE CODE SO IDENTIFIED, OR
57
#  WITHDRAWAL OF THE CODE CAPABILITY TO THE EXTENT NEEDED TO COMPLY WITH
58
#  ANY SUCH LICENSES OR RIGHTS.
59
#
60
422 by graziano
We use a master init.d script for the java ws and we generate the script
61
#
62
# chkconfig: 2345 99 05
63
# description: script for starting and stopping eucalyptus java ws services
64
#
65
### BEGIN INIT INFO
444.21.1 by graziano
use euca_conf to enable/disable ws starts/stop and use only one init
66
# Provides:                   eucalyptus
422 by graziano
We use a master init.d script for the java ws and we generate the script
67
# Required-Start:             $remote_fs $syslog 
68
# Should-Start:               START
69
# Required-Stop:              $remote_fs $syslog 
70
# Default-Start:              2 3 4 5
71
# Default-Stop:	              0 1 6
444.21.1 by graziano
use euca_conf to enable/disable ws starts/stop and use only one init
72
# Short-Description:          Start Eucalyptus 
73
# Description:                Start the Eucalyptus services
422 by graziano
We use a master init.d script for the java ws and we generate the script
74
# X-UnitedLinux-Default-Enabled: yes
75
### END INIT INFO
76
#
77
78
# Do NOT "set -e"
79
80
# we need to source the current path in case of manual intallation
81
export PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH
444.21.1 by graziano
use euca_conf to enable/disable ws starts/stop and use only one init
82
DESC="Eucalyptus services"
444.21.2 by graziano
Ready for more testing.
83
NAME=""
422 by graziano
We use a master init.d script for the java ws and we generate the script
84
ANT="`which ant 2> /dev/null`"
85
JAVA="`which java 2> /dev/null`"
86
EUCA_USER="eucalyptus"
87
444.1.342 by graziano
better handling of --register-* in euca_conf
88
# available services
89
WALRUS_WS="N"
90
CLOUD_WS="N"
91
STORAGE_WS="N"
422 by graziano
We use a master init.d script for the java ws and we generate the script
92
93
if [ "$EUID" != "0" ]; then
444.1.173 by graziano
Be sure we are checking for the right sercice.
94
	echo "Eucalyptus init scripts must be run as root."
95
	exit 1
422 by graziano
We use a master init.d script for the java ws and we generate the script
96
fi
97
98
# if we have lsb functions let's source them
99
WE_HAVE_LSB="N"
100
if [ -e /lib/lsb/init-functions ]; then
101
	. /lib/lsb/init-functions
102
	# very old lsb don't have the functions we need
103
	if type log_daemon_msg > /dev/null 2> /dev/null ; then
104
		WE_HAVE_LSB="Y"
105
	fi
106
fi
107
108
# honor the ENV variable if found otherwise look in root
109
if [ -z "$EUCALYPTUS" ] ; then
110
       EUCALYPTUS="@prefix@"
111
       if [ ! -e ${EUCALYPTUS}/etc/eucalyptus/eucalyptus.conf ] ; then 
112
              EUCALYPTUS="/"
113
       fi
114
fi
115
116
# Read configuration variable file if it is present
117
if [ -r $EUCALYPTUS/etc/eucalyptus/eucalyptus.conf ]; then
444.1.179 by graziano
avoid useless warning
118
	EUCA_TMP="`readlink -f ${EUCALYPTUS}`"
422 by graziano
We use a master init.d script for the java ws and we generate the script
119
	. $EUCALYPTUS/etc/eucalyptus/eucalyptus.conf
120
121
	# has eucalyptus been configured?
122
	if [ "$EUCALYPTUS" = "not_configured" ]; then
123
		echo "EUCALYPTUS not configured!" 
124
		exit 1
125
	fi
126
127
	# there may be inconsistencied between conf file and env variable
444.1.179 by graziano
avoid useless warning
128
	if [ "$EUCA_TMP" != "`readlink -f ${EUCALYPTUS}`" ]; then
422 by graziano
We use a master init.d script for the java ws and we generate the script
129
		echo "Warning: you should check EUCALYPTUS in conf file"
130
	fi
131
else
444.16.84 by graziano
Made the init.d scripts less strict in checking dependencies if we are
132
	# on removal of RPM we can get in a state in which the conf file
133
	# is gone but the services are still running: make this hard
134
	# failure only if we are not stopping
422 by graziano
We use a master init.d script for the java ws and we generate the script
135
	echo "Cannot find eucalyptus configuration file!"
444.16.84 by graziano
Made the init.d scripts less strict in checking dependencies if we are
136
	if [ "$1" != "stop" ]; then
137
		exit 1
138
	fi
422 by graziano
We use a master init.d script for the java ws and we generate the script
139
fi
140
export EUCALYPTUS
141
142
pidfile=$EUCALYPTUS/var/run/eucalyptus/eucalyptus-cloud.pid
143
444.1.342 by graziano
better handling of --register-* in euca_conf
144
# read in the services which should be running
145
read_ws_list() {
146
	STORAGE_WS="N"
147
	WALRUS_WS="N"
444.21.2 by graziano
Ready for more testing.
148
	CLOUD_WS="N"	
149
	NAME=""
444.1.342 by graziano
better handling of --register-* in euca_conf
150
444.21.1 by graziano
use euca_conf to enable/disable ws starts/stop and use only one init
151
	for x in `cat $EUCALYPTUS/var/lib/eucalyptus/services 2> /dev/null` ; do
444.1.342 by graziano
better handling of --register-* in euca_conf
152
		case $x in
153
		walrus)
154
			WALRUS_WS="Y"
444.21.2 by graziano
Ready for more testing.
155
			NAME="walrus $NAME"
156
			;;
444.21.10 by graziano
Cosmetic changes.
157
		sc) 
444.21.2 by graziano
Ready for more testing.
158
			STORAGE_WS="Y"
444.21.10 by graziano
Cosmetic changes.
159
			NAME="sc $NAME"
444.21.2 by graziano
Ready for more testing.
160
			;;
444.21.10 by graziano
Cosmetic changes.
161
		cloud)
444.1.342 by graziano
better handling of --register-* in euca_conf
162
			CLOUD_WS="Y"
444.21.10 by graziano
Cosmetic changes.
163
			NAME="cloud $NAME"
444.1.342 by graziano
better handling of --register-* in euca_conf
164
			;;
165
		*)
166
			echo "Unknown service! ($x)"
167
			;;
168
		esac
169
	done
170
}
444.21.1 by graziano
use euca_conf to enable/disable ws starts/stop and use only one init
171
422 by graziano
We use a master init.d script for the java ws and we generate the script
172
check_java() {
173
	java_min_version="1.6.0"
174
175
	# we need a good JAVA_HOME
176
	if [ -z "$JAVA_HOME" ]; then
177
		# user didn't setup JAVA_HOME, let's look for it
178
		if [ -z "$JAVA" ]; then
179
			echo "Cannot find java!"
180
			exit 1
181
		fi
182
		JAVA_HOME="`readlink -f $JAVA`"
183
		JAVA_HOME="`dirname $JAVA_HOME|sed 's:/jre/bin::'`"
184
		if [ ! -d $JAVA_HOME ]; then
185
			echo "Cannot find a good JAVA_HOME"
186
			exit 1
187
		fi
188
	fi
189
	
190
	# to be sure we are using the right java/JAVA_HOME
191
	JAVA="$JAVA_HOME/jre/bin/java"
192
193
	# let's see if we can find a decent java
194
	if [ -x "$JAVA" ]; then
195
		java_version=`$JAVA -version 2>&1 | grep "java version" | sed -e 's/.*java version "\(.*\)".*/\1/'`
196
		if [ `expr $java_version "<" $java_min_version` -eq 0 ]; then
197
			export JAVA_HOME
198
			return 
199
		fi
200
	fi
201
202
	echo "Eucalyptus needs java version >= $java_min_version"
203
	exit 1
204
}
205
206
do_start() {
444.37.77 by Neil
don't reset CLOUD_OPTS.
207
	if [ -z "$CLOUD_OPTS" ]; then
444.66.196 by decker
temporarily modify init script for qa
208
		local CLOUD_OPTS="--log-level=TRACE"
444.37.77 by Neil
don't reset CLOUD_OPTS.
209
	fi
422 by graziano
We use a master init.d script for the java ws and we generate the script
210
211
	# basic checks
444.16.84 by graziano
Made the init.d scripts less strict in checking dependencies if we are
212
	if [ ! -x $EUCALYPTUS/usr/sbin/euca_conf ]; then
213
		echo "Some eucalyptus components are missing"
214
		exit 1
215
	fi
216
422 by graziano
We use a master init.d script for the java ws and we generate the script
217
	check_java
218
	
219
	cd $EUCALYPTUS/etc/eucalyptus
444.1.33 by root
added 'deregister' to euca_conf, eucalyptus-dns handling from eucalyptus.conf
220
444.39.7 by graziano obertelli
Removed possible double --disable-storage.
221
	# options from the configuration file
444.52.3 by Neil
tweaked init script so that options disabled by default will be disabled when not specified.
222
	if [ "$DISABLE_DNS" != "N" ]; then
444.37.60 by Neil
add CLOUD_OPTS.
223
		CLOUD_OPTS="$CLOUD_OPTS --remote-dns"
444.39.7 by graziano obertelli
Removed possible double --disable-storage.
224
	fi
225
	if [ "$DISABLE_EBS" = "Y" ]; then
444.37.60 by Neil
add CLOUD_OPTS.
226
		CLOUD_OPTS="$CLOUD_OPTS --disable-storage"
444.39.7 by graziano obertelli
Removed possible double --disable-storage.
227
	fi
444.52.3 by Neil
tweaked init script so that options disabled by default will be disabled when not specified.
228
	if [ "$DISABLE_ISCSI" != "N" ]; then
444.37.60 by Neil
add CLOUD_OPTS.
229
		CLOUD_OPTS="$CLOUD_OPTS --disable-iscsi"
444.39.7 by graziano obertelli
Removed possible double --disable-storage.
230
	fi
231
444.1.342 by graziano
better handling of --register-* in euca_conf
232
	# enabled services
233
	if [ "$STORAGE_WS" != "Y" ]; then
444.39.7 by graziano obertelli
Removed possible double --disable-storage.
234
		if [ "$DISABLE_EBS" != "Y" ]; then
444.37.60 by Neil
add CLOUD_OPTS.
235
			CLOUD_OPTS="$CLOUD_OPTS --disable-storage"
444.39.7 by graziano obertelli
Removed possible double --disable-storage.
236
		fi
237
	else
238
		if [ "$DISABLE_EBS" = "Y" ]; then
239
			echo "DISABLE_EBS is set in eucalyptus.conf: not starting the sc"
240
		else
241
			if ! $EUCALYPTUS/usr/sbin/euca_conf --check sc ; then
242
				exit 1
243
			fi
444.16.84 by graziano
Made the init.d scripts less strict in checking dependencies if we are
244
		fi
444.1.342 by graziano
better handling of --register-* in euca_conf
245
	fi
246
	if [ "$WALRUS_WS" != "Y" ]; then
444.37.60 by Neil
add CLOUD_OPTS.
247
		CLOUD_OPTS="$CLOUD_OPTS --disable-walrus"
444.39.7 by graziano obertelli
Removed possible double --disable-storage.
248
	else
444.16.84 by graziano
Made the init.d scripts less strict in checking dependencies if we are
249
		if ! $EUCALYPTUS/usr/sbin/euca_conf --check walrus ; then
250
			exit 1
251
		fi
444.1.342 by graziano
better handling of --register-* in euca_conf
252
	fi
253
	if [ "$CLOUD_WS" != "Y" ]; then
444.37.60 by Neil
add CLOUD_OPTS.
254
		CLOUD_OPTS="$CLOUD_OPTS --disable-cloud"
444.39.7 by graziano obertelli
Removed possible double --disable-storage.
255
	else
444.16.84 by graziano
Made the init.d scripts less strict in checking dependencies if we are
256
		if ! $EUCALYPTUS/usr/sbin/euca_conf --check cloud ; then
257
			exit 1
258
		fi
444.1.348 by graziano obertelli
removed is_ws_enabled: handle_ws handle that case too.
259
	fi
444.1.342 by graziano
better handling of --register-* in euca_conf
260
444.1.348 by graziano obertelli
removed is_ws_enabled: handle_ws handle that case too.
261
	if [ "${STORAGE_WS}${CLOUD_WS}${WALRUS_WS}" = "NNN" ]; then
262
		# nothing to start
444.21.9 by graziano
When no services are starting printing "none" instead of nothing.
263
		NAME="none"
444.1.348 by graziano obertelli
removed is_ws_enabled: handle_ws handle that case too.
264
		return 0
265
	fi
266
444.72.21 by decker
revert to old init script
267
    # try log4j for a bit, see if anyone panics. $EUCALYPTUS/usr/sbin/eucalyptus-cloud $CLOUD_OPTS -h $EUCALYPTUS -u $EUCA_USER --pidfile ${pidfile} -f -o $EUCALYPTUS/var/log/eucalyptus/cloud-output.log >/dev/null 2>&1
268
	$EUCALYPTUS/usr/sbin/eucalyptus-cloud $CLOUD_OPTS -h $EUCALYPTUS -u $EUCA_USER --pidfile ${pidfile} -f -L console-log >/dev/null 2>&1
444.1.342 by graziano
better handling of --register-* in euca_conf
269
422 by graziano
We use a master init.d script for the java ws and we generate the script
270
	return $?
271
}
272
273
do_status() {
274
	if [ -s ${pidfile} ]; then
275
		pid=`cat ${pidfile} 2> /dev/null`
444.16.5 by root
Init scripts would not stop eucalyptus services if euca was installed somewhere with a long path prefix (/opt/eucalyptus). Changed pid check from 'ps ax | grep ...' to 'ps axww | grep ...'. LP: #456877
276
		if ! ps axww|grep $pid|grep eucalyptus-cloud.pid > /dev/null; then
444.1.342 by graziano
better handling of --register-* in euca_conf
277
			# pid file is not matching
278
			rm -f ${pidfile}
279
			return 1
422 by graziano
We use a master init.d script for the java ws and we generate the script
280
		fi
444.1.342 by graziano
better handling of --register-* in euca_conf
281
	else
282
		# no pidfile, no running services
283
		return 1
422 by graziano
We use a master init.d script for the java ws and we generate the script
284
	fi
444.1.346 by root
init script fixes
285
286
	return $?
422 by graziano
We use a master init.d script for the java ws and we generate the script
287
}
288
289
do_stop() {
290
	# now stop the service
291
	if [ -s "${pidfile}" ]; then
292
		pid=`cat $pidfile 2> /dev/null`
444.1.346 by root
init script fixes
293
		kill $pid > /dev/null 2>&1
422 by graziano
We use a master init.d script for the java ws and we generate the script
294
	else
295
		return
296
	fi
297
298
	# let's way few seconds than kill harder
299
	timeout=20
300
	while [ $timeout -gt 0 ]; do
301
		if do_status ; then
302
			sleep 1
303
			timeout=$(($timeout - 1))
304
		else
305
			break
306
		fi
307
	done
308
	if [ $timeout -eq 0 ]; then
309
		kill -9 $pid > /dev/null 2>&1 
310
	fi
311
	rm -f $pidfile
444.1.346 by root
init script fixes
312
422 by graziano
We use a master init.d script for the java ws and we generate the script
313
}
314
315
# let's get the user to use
316
if [ -z "$EUCA_USER" ] ; then
317
	EUCA_USER="root"
318
fi
319
320
# set the library path correctly
321
export LD_LIBRARY_PATH="$EUCALYPTUS/usr/lib/eucalyptus:$LD_LIBRARY_PATH"
654 by Thierry Carrez
tools/eucalyptus-cc.in, tools/eucalyptus-java-ws.in: No longer patch
322
#VERBOSE="yes"
444.1.346 by root
init script fixes
323
444.21.1 by graziano
use euca_conf to enable/disable ws starts/stop and use only one init
324
# read services to start
444.1.346 by root
init script fixes
325
read_ws_list
422 by graziano
We use a master init.d script for the java ws and we generate the script
326
327
case "$1" in
328
  start)
654 by Thierry Carrez
tools/eucalyptus-cc.in, tools/eucalyptus-java-ws.in: No longer patch
329
	if [ "$VERBOSE" != no ]; then
422 by graziano
We use a master init.d script for the java ws and we generate the script
330
		if [ "$WE_HAVE_LSB" = "Y" ]; then
444.21.1 by graziano
use euca_conf to enable/disable ws starts/stop and use only one init
331
			log_daemon_msg "Starting $DESC" "$NAME"
422 by graziano
We use a master init.d script for the java ws and we generate the script
332
		else
444.16.40 by graziano
Uninstalling RPMs wouldn't stop the services anylonger: fixed.
333
			echo -n "Starting $DESC: $NAME"
422 by graziano
We use a master init.d script for the java ws and we generate the script
334
		fi
654 by Thierry Carrez
tools/eucalyptus-cc.in, tools/eucalyptus-java-ws.in: No longer patch
335
	fi
422 by graziano
We use a master init.d script for the java ws and we generate the script
336
337
	# let's check there is no previous cloud running
338
	if do_status ; then
654 by Thierry Carrez
tools/eucalyptus-cc.in, tools/eucalyptus-java-ws.in: No longer patch
339
		echo
340
		echo "another $DESC is already running!"
341
		if [ "$VERBOSE" != no ]; then
342
			if [ "$WE_HAVE_LSB" = "Y" ]; then
343
				log_end_msg 1
344
			fi
422 by graziano
We use a master init.d script for the java ws and we generate the script
345
		fi
513 by Dustin Kirkland
* tools/eucalyptus-cc.in, tools/eucalyptus-java-ws.in,
346
		exit 0
422 by graziano
We use a master init.d script for the java ws and we generate the script
347
	fi
348
349
	do_start
444.1.342 by graziano
better handling of --register-* in euca_conf
350
422 by graziano
We use a master init.d script for the java ws and we generate the script
351
	case "$?" in
352
	0|1) 
654 by Thierry Carrez
tools/eucalyptus-cc.in, tools/eucalyptus-java-ws.in: No longer patch
353
		if [ "$VERBOSE" != no ]; then
422 by graziano
We use a master init.d script for the java ws and we generate the script
354
			if [ "$WE_HAVE_LSB" = "Y" ]; then
355
				log_end_msg 0
356
			else
357
				echo "done."
358
			fi
654 by Thierry Carrez
tools/eucalyptus-cc.in, tools/eucalyptus-java-ws.in: No longer patch
359
		fi
422 by graziano
We use a master init.d script for the java ws and we generate the script
360
		;;
361
	*)
654 by Thierry Carrez
tools/eucalyptus-cc.in, tools/eucalyptus-java-ws.in: No longer patch
362
		if [ "$VERBOSE" != no ]; then
422 by graziano
We use a master init.d script for the java ws and we generate the script
363
			if [ "$WE_HAVE_LSB" = "Y" ]; then
364
				log_end_msg 1
365
			else
366
				echo "failed!"
367
			fi
654 by Thierry Carrez
tools/eucalyptus-cc.in, tools/eucalyptus-java-ws.in: No longer patch
368
		fi
422 by graziano
We use a master init.d script for the java ws and we generate the script
369
		;;
370
	esac
371
	;;
372
  stop)
654 by Thierry Carrez
tools/eucalyptus-cc.in, tools/eucalyptus-java-ws.in: No longer patch
373
	if [ "$VERBOSE" != no ]; then
422 by graziano
We use a master init.d script for the java ws and we generate the script
374
		if [ "$WE_HAVE_LSB" = "Y" ]; then
444.16.40 by graziano
Uninstalling RPMs wouldn't stop the services anylonger: fixed.
375
			log_daemon_msg "Stopping $DESC" "$NAME"
422 by graziano
We use a master init.d script for the java ws and we generate the script
376
		else
444.16.40 by graziano
Uninstalling RPMs wouldn't stop the services anylonger: fixed.
377
			echo -n "Stopping $DESC: $NAME"
422 by graziano
We use a master init.d script for the java ws and we generate the script
378
		fi
654 by Thierry Carrez
tools/eucalyptus-cc.in, tools/eucalyptus-java-ws.in: No longer patch
379
	fi
422 by graziano
We use a master init.d script for the java ws and we generate the script
380
	
444.1.342 by graziano
better handling of --register-* in euca_conf
381
	# let's check there is a previous cloud running
382
	if ! do_status ; then
383
		echo
384
		echo "no $DESC is running!"
654 by Thierry Carrez
tools/eucalyptus-cc.in, tools/eucalyptus-java-ws.in: No longer patch
385
		if [ "$VERBOSE" != no ]; then
444.1.342 by graziano
better handling of --register-* in euca_conf
386
			if [ "$WE_HAVE_LSB" = "Y" ]; then
387
				log_end_msg 1
388
			fi
654 by Thierry Carrez
tools/eucalyptus-cc.in, tools/eucalyptus-java-ws.in: No longer patch
389
		fi
444.1.346 by root
init script fixes
390
		exit 0
422 by graziano
We use a master init.d script for the java ws and we generate the script
391
	fi
392
393
	do_stop
444.21.1 by graziano
use euca_conf to enable/disable ws starts/stop and use only one init
394
654 by Thierry Carrez
tools/eucalyptus-cc.in, tools/eucalyptus-java-ws.in: No longer patch
395
	if [ "$VERBOSE" != no ]; then
422 by graziano
We use a master init.d script for the java ws and we generate the script
396
		if [ "$WE_HAVE_LSB" = "Y" ]; then
397
			log_end_msg 0
398
		else
399
			echo "done."
400
		fi
654 by Thierry Carrez
tools/eucalyptus-cc.in, tools/eucalyptus-java-ws.in: No longer patch
401
	fi
422 by graziano
We use a master init.d script for the java ws and we generate the script
402
	;;
403
  restart)
424 by graziano
Cleaned up the restart and made the stop more quiet.
404
	$0 stop
405
	$0 start
422 by graziano
We use a master init.d script for the java ws and we generate the script
406
  	;;
407
  status)
408
	if do_status ; then
444.21.8 by graziano
Added list of services in the status.
409
		echo "$DESC ($NAME) is/are running"
422 by graziano
We use a master init.d script for the java ws and we generate the script
410
	else
411
		exit 3
412
	fi
413
	;;
414
  *)
444.21.2 by graziano
Ready for more testing.
415
	echo "Usage: $0 {start|stop|restart}" >&2
422 by graziano
We use a master init.d script for the java ws and we generate the script
416
	exit 3
417
	;;
418
esac
419