#!/sbin/sh # # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "@(#)http-apache2 1.2 04/11/11 SMI" # . /lib/svc/share/smf_include.sh APACHE_HOME=/u01/app/apache CONF_FILE=${APACHE_HOME}/conf/httpd.conf PIDFILE=${APACHE_HOME}/logs/httpd.pid [ ! -f ${CONF_FILE} ] && exit $SMF_EXIT_ERR_CONFIG case "$1" in start) /bin/rm -f ${PIDFILE} /bin/mkdir -p /var/run/apache2 ssl=`svcprop -p httpd/ssl svc:/network/http:apache2` if [ "$ssl" = false ]; then cmd="start" else cmd="startssl" fi ;; refresh) cmd="graceful" ;; stop) cmd="stop" ;; *) echo "Usage: $0 {start|stop|refresh}" exit 1 ;; esac exec ${APACHE_HOME}/bin/apachectl $cmd 2>&1