#!/bin/sh # define common locations and temp dirs WEBCON_DIR=${ROOTDIR}/usr/share/webconsole PRIV_BIN_DIR=${ROOTDIR}/usr/share/webconsole/private/bin BIN_DIR=/usr/share/webconsole/bin ETC_DIR=${ROOTDIR}/etc/webconsole/console/ TMP_DIR=${ETC_DIR}/.backoutpatch_tmp RESTART_FLAG=${TMP_DIR}/restart DEFAULT_DOMAIN_NAME=console BUN_FILE=/var/svc/manifest/system/webconsole.xml # Only execute commands if patching live system. if [ "${ROOTDIR}" = "" -o "${ROOTDIR}" = "/" ]; then # wcremove console domain ${PRIV_BIN_DIR}/wcremove -i ${DEFAULT_DOMAIN_NAME} # For s10 and up wcremove will place the console in # maintenance mode, so clear before restart # SMF service bundle file must be installed for S10 up. # It will not be installed in the package otherwise. if [ -f ${BUN_FILE} ]; then svcadm clear svc:system/webconsole:console fi # determine console status, start if necessary, # set flag for restart after the patch is applied if [ -f ${RESTART_FLAG} ];then # start the server ${BIN_DIR}/smcwebserver restart fi fi # remove temporary directory rm -rf ${TMP_DIR} exit 0