home *** CD-ROM | disk | FTP | other *** search
/ Chip: Linux Special / CorelLinux_CHIP.iso / StarOffice / office51 / f_470_1 / SHTTPD
Encoding:
Text File  |  1999-08-06  |  1.1 KB  |  59 lines

  1. #!/bin/sh
  2. #
  3. # Sun Microsystems Daemon Start Script
  4. # (c) 1998, Sun Microsystems, Inc.
  5.  
  6. #set -x
  7.  
  8. cd "`dirname "$0"`"
  9. current_dir=`pwd`
  10. current_base=`basename "$0"`
  11.  
  12. sd_binary=$current_base.bin
  13. sd_platform=`uname -s`
  14.  
  15.  
  16. # set search path for shared libraries
  17. case $sd_platform in
  18.   SunOS)
  19.     LD_LIBRARY_PATH=$current_dir:.:$LD_LIBRARY_PATH
  20.     export LD_LIBRARY_PATH
  21.     ;;
  22.    IRIX)
  23.     LD_LIBRARYN32_PATH=$current_dir:.:$LD_LIBRARY_PATH
  24.     export LD_LIBRARYN32_PATH
  25.     ;;
  26.       *)
  27.     LD_LIBRARY_PATH=$current_dir:.:$LD_LIBRARY_PATH
  28.     export LD_LIBRARY_PATH
  29.     ;;
  30. esac
  31.  
  32. #parse command line options
  33. dollar_null="${current_dir}"/${current_base}
  34. OTHER_ARGS=
  35.  
  36. while [ $# -gt 0 ]; do
  37.     case "$1" in
  38.         -install)
  39.             exec "$current_dir/$sd_binary" -i "$dollar_null"
  40.             ;;
  41.         -i)
  42.             exec "$current_dir/$sd_binary" -i "$dollar_null"
  43.             ;;
  44.         -uninstall)
  45.             exec "$current_dir/$sd_binary" -u "$dollar_null"
  46.             ;;
  47.         -u)
  48.             exec "$current_dir/$sd_binary" -u "$dollar_null"
  49.             ;;
  50.         *)
  51.             OTHER_ARGS="$OTHER_ARGS $1"
  52.             ;;
  53.     esac
  54.     shift
  55. done
  56.  
  57. # execute binary
  58. exec "$current_dir/$sd_binary" $OTHER_ARGS
  59.