18 # information: Portions Copyright [yyyy] [name of copyright owner]
19 #
20 # CDDL HEADER END
21 #
22 #
23 # Copyright 2006 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
25 #
26 #ident "%Z%%M% %I% %E% SMI"
27 #
28 # Service Method Support Script for the SLP service
29 #
30 # - operates a proxy for slpd which brings up the JVM to run slpd
31 # when required by a client; this prevents keeping JVM's alive
32 # when the service is not in use.
33 #
34
35 . /lib/svc/share/smf_include.sh
36
37 CONF=/etc/inet/slp.conf
38 JAVA_BIN=/usr/j2se/bin/java
39 CLASSPATH=/usr/share/lib/slp/slpd.jar
40 MAIN_CLASS=com.sun.slp.slpd
41 SLPD_HOME=/usr/lib/inet
42 SLPD=slpd
43 SLPD_BIN=$SLPD_HOME/$SLPD
44
45 case "$1" in
46 'start')
47 # Start slpd proxy (as a fragile dependency, conf file must exist)
48 $SLPD_BIN -f $CONF >/dev/msglog 2>&1 &
49 ;;
50
51 'stop')
52 # Kill the slpd proxy.
53 /usr/bin/pkill -x -u 0 -P 1 -z `smf_zonename` $SLPD
54
55 # If a configuration file exists signal a shutdown to the real slpd.
56 [ -f $CONF ] && {
57 $JAVA_BIN -classpath $CLASSPATH \
58 $MAIN_CLASS stop -f $CONF >/dev/msglog 2>&1 &
|
18 # information: Portions Copyright [yyyy] [name of copyright owner]
19 #
20 # CDDL HEADER END
21 #
22 #
23 # Copyright 2006 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
25 #
26 #ident "%Z%%M% %I% %E% SMI"
27 #
28 # Service Method Support Script for the SLP service
29 #
30 # - operates a proxy for slpd which brings up the JVM to run slpd
31 # when required by a client; this prevents keeping JVM's alive
32 # when the service is not in use.
33 #
34
35 . /lib/svc/share/smf_include.sh
36
37 CONF=/etc/inet/slp.conf
38 JAVA_BIN=/usr/java/bin/java
39 CLASSPATH=/usr/share/lib/slp/slpd.jar
40 MAIN_CLASS=com.sun.slp.slpd
41 SLPD_HOME=/usr/lib/inet
42 SLPD=slpd
43 SLPD_BIN=$SLPD_HOME/$SLPD
44
45 case "$1" in
46 'start')
47 # Start slpd proxy (as a fragile dependency, conf file must exist)
48 $SLPD_BIN -f $CONF >/dev/msglog 2>&1 &
49 ;;
50
51 'stop')
52 # Kill the slpd proxy.
53 /usr/bin/pkill -x -u 0 -P 1 -z `smf_zonename` $SLPD
54
55 # If a configuration file exists signal a shutdown to the real slpd.
56 [ -f $CONF ] && {
57 $JAVA_BIN -classpath $CLASSPATH \
58 $MAIN_CLASS stop -f $CONF >/dev/msglog 2>&1 &
|