home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- #
- # @(#) preremove.shinc 12.7 97/11/17
- #
- # Copyright (c) 1997 The Santa Cruz Operation, Inc.. All Rights Reserved.
- # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE SANTA CRUZ OPERATION INC.
- # The copyright notice above does not evidence any actual or intended
- # publication of such source code.
- #
- ME="`basename $0`"
- ISL_FILE="/etc/inst/scripts/postreboot.sh"
- SUCCESS=0; FAIL=1; INTR=3
- trap "exit $INTR" 2 3 15
-
- # location of the packaging information files during this phase of installation
- INSTALL_DIR="/var/sadm/pkg/$PKGINST/install/$PKGINST"
-
-
- ##########################################################################
- #
- # disable_servers
- #
- # disables all Web servers
- #
- ##########################################################################
- disable_servers()
- {
- if [ -x /usr/sbin/nsfast ]; then
- /usr/sbin/nsfast disable
- fi
- if [ -x /etc/scohelphttp ]; then
- /etc/scohelphttp stop
- fi
- }
-
-
- ##########################################################################
- #
- # main
- #
- ##########################################################################
-
- # shut things down and unravel them
- disable_servers
-
- # remove a file that cannot be mentioned in the pkgmap, since it does
- # not exist until the admin server is run for the first time, and
- # cannot be shipped empty
- rm -f /usr/ns-home/admserv/httpd-80/admin.conf
-
- # remove the httpd: entry from the servers.lst file
- if [ -f /usr/ns-home/admserv/servers.lst ]; then
- cp /usr/ns-home/admserv/servers.lst /tmp/_ccs$$
- sed -e "/^httpd:/d" </tmp/_ccs$$ >/usr/ns-home/admserv/servers.lst
- rm -f /tmp/_ccs$$
- fi
-
- # done
- exit $SUCCESS
-