home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1999 March B / SCO_CASTOR4RRT.iso / nsfast / install / preremove < prev    next >
Encoding:
Text File  |  1998-08-19  |  1.6 KB  |  60 lines

  1. #!/bin/sh
  2. #
  3. #       @(#) preremove.shinc 12.7 97/11/17 
  4. #
  5. # Copyright (c) 1997 The Santa Cruz Operation, Inc.. All Rights Reserved.
  6. # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE SANTA CRUZ OPERATION INC.
  7. # The copyright notice above does not evidence any actual or intended
  8. # publication of such source code.
  9. ME="`basename $0`"
  10. ISL_FILE="/etc/inst/scripts/postreboot.sh"
  11. SUCCESS=0; FAIL=1; INTR=3
  12. trap "exit $INTR" 2 3 15
  13.  
  14. # location of the packaging information files during this phase of installation
  15. INSTALL_DIR="/var/sadm/pkg/$PKGINST/install/$PKGINST"
  16.  
  17.  
  18. ##########################################################################
  19. #
  20. # disable_servers
  21. #
  22. # disables all Web servers
  23. #
  24. ##########################################################################
  25. disable_servers()
  26. {
  27.     if [ -x /usr/sbin/nsfast ]; then
  28.         /usr/sbin/nsfast disable
  29.     fi
  30.     if [ -x /etc/scohelphttp ]; then
  31.         /etc/scohelphttp stop
  32.     fi
  33. }
  34.  
  35.  
  36. ##########################################################################
  37. #
  38. # main
  39. #
  40. ##########################################################################
  41.  
  42. # shut things down and unravel them
  43. disable_servers
  44.  
  45. # remove a file that cannot be mentioned in the pkgmap, since it does
  46. # not exist until the admin server is run for the first time, and
  47. # cannot be shipped empty
  48. rm -f /usr/ns-home/admserv/httpd-80/admin.conf
  49.  
  50. # remove the httpd: entry from the servers.lst file
  51. if [ -f /usr/ns-home/admserv/servers.lst ]; then
  52.     cp /usr/ns-home/admserv/servers.lst /tmp/_ccs$$
  53.     sed -e "/^httpd:/d" </tmp/_ccs$$ >/usr/ns-home/admserv/servers.lst
  54.     rm -f /tmp/_ccs$$
  55. fi
  56.  
  57. # done
  58. exit $SUCCESS
  59.