Advertisement
Guest User

Untitled

a guest
Apr 6th, 2012
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2. #
  3. # Init script for SHOUTcast
  4. # by caraoge, modified to work correctly by Thomas R Bailey
  5. # Last edited Sept 3 2009
  6.  
  7. # Set config to config file location
  8. # set daemon to sc_serv location
  9. ################################################## ##########################
  10. ## CHANGE THESE VALUES to match your setup
  11. ## CONFIG is the fully qualified location of your config file
  12. ## DAEMON is the fully qualified location of the sc_serv binary
  13. ## Note, the script will look for sc_serv and sc_serv.conf in /usr/lib/shout
  14. ################################################## ##########################
  15. CONFIG="/root/shoutcastMisfit/sc_serv.conf"
  16. DAEMON="/root/shoutcastMisfit/sc_serv3"
  17.  
  18. ############# Don't fiddle below this line ##############
  19. # Check for SHOUTcast binary
  20. test -f $DAEMON || exit 0
  21.  
  22. # The init commands
  23. case "$1" in
  24. start)
  25. echo "Starting SHOUTcast server..."
  26. $DAEMON $CONFIG > /dev/null 2>&1 &
  27. ;;
  28. stop)
  29. echo "Stopping SHOUTcast server..."
  30. kill -9 `ps -C sc_serv3 -o pid --no-headers`
  31. ;;
  32. restart)
  33. echo "Stopping SHOUTcast server..."
  34. kill -9 `ps -C sc_serv3 -o pid --no-headers`
  35. echo "Starting SHOUTcast server..."
  36. $DAEMON $CONFIG > /dev/null 2>&1 &
  37. ;;
  38. *)
  39. echo "usage: /etc/init.d/shoutcast"
  40. echo "$0 {start | stop | restart}"
  41. exit 1
  42. ;;
  43. esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement