home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Linux / Magazine / wwwoffle-2.1.tar.gz / wwwoffle-2.1 / contrib / redhat-init < prev    next >
Text File  |  1997-12-19  |  1KB  |  49 lines

  1. #!/bin/sh
  2. # =============================================================================
  3. # File:    //twin.macario.org/etc/rc.d/init.d/wwwoffle.init
  4. #
  5. # Description:
  6. #    This shell script takes care of starting and stopping wwwoffled.
  7. #
  8. # Author[s]:
  9. #    Gianpaolo Macario    gianpi@geocities.com
  10. #
  11. # Revision History:
  12. #    21-JUL-1997    gianpi    Configured for wwwoffle-1.2c
  13. #    10-MAR-1997    gianpi    Initial writing
  14. # =============================================================================
  15.  
  16. # Source function library.
  17. . /etc/rc.d/init.d/functions
  18.  
  19. # Source networking configuration.
  20. . /etc/sysconfig/network
  21.  
  22. # Check that networking is up.
  23. [ ${NETWORKING} = "no" ] && exit 0
  24.  
  25. [ -f /usr/local/sbin/wwwoffled ] || exit 0
  26.  
  27. # See how we were called.
  28. case "$1" in
  29.   start)
  30.         # Start daemons.
  31.         echo -n "Starting wwwoffled: "
  32.         /usr/local/sbin/wwwoffled -c /etc/wwwoffle.conf
  33.         echo
  34.         ;;
  35.   stop)
  36.         # Stop daemons.
  37.         echo -n "Shutting down wwwoffled: "
  38.     killproc wwwoffled
  39.         echo "done"
  40.         ;;
  41.   *)
  42.         echo "Usage: wwwoffle.init {start|stop}"
  43.         exit 1
  44. esac
  45.  
  46. exit 0
  47.  
  48. # === End of File ===
  49.