Скрипт запуска, остановки, перезапуска потокового сервера shoutcast (update июль 2015)
Вот нашёл скрипт запуска сервера shoutcast, решил сохранить на память. Ниже может быть что-то не верно, точно не помню: 1 2 3 4 5 6 7 8 9 cd /etc/init.d vim shoutcast **paste in above data and save** chmod 0755 /etc/init.d/shoutcast cd /etc/rc.d/rc5.d ln -s ../init.d/shoutcast S99shoutcast chkconfig --add shoutcast chkconfig shoutcast on /etc/init.d/shoutcast start Конечно вы можете заремить строки, содержащие $DAEMON $CONFIG2 > /dev/null 2>&1 &, $DAEMON $CONFIG3 > /dev/null 2>&1 &, и т.д. Что ниже уже сделано. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 #!/bin/sh ### BEGIN INIT INFO # Provides: shoutcast # Required-Start: $remote_fs $network # Required-Stop: $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Stop/start script Shoutcast # Description: Init script for SHOUTcast. By caraoge, Thomas R Bailey, modified for work with three servers by Nathan Skelton, last mod D.Tashin # Latest Shoutcast DNAS leave here http://download.nullsoft.com/shoutcast/tools/, but not all version work with UTF-8. ### END INIT INFO # # Last edited Jul 25 2015 # Set config to config file location # set daemon to sc_serv location ############################################################################ ## CHANGE THESE VALUES to match your setup ## CONFIG is the fully qualified location of your config file ## DAEMON is the fully qualified location of the sc_serv binary ## Note, the script will look for sc_serv and sc_serv.conf in /home/shoutcast ############################################################################ BIN="sc_serv" DAEMON="/usr/bin/sc_serv" CONFIG="/etc/shoutcast/sc_serv.conf" #CONFIG2="/home/shoutcast/sc_serv2.conf" #CONFIG3="/home/shoutcast/sc_serv3.conf" DESC="Shoutcast DNAS server" ############# Don't fiddle below this line ############## # Check for SHOUTcast binary test -f $DAEMON || exit 0 # The init commands case "$1" in start) echo "Starting $DESC..." $DAEMON $CONFIG > /dev/null 2>&1 & # $DAEMON $CONFIG2 > /dev/null 2>&1 & # $DAEMON $CONFIG3 > /dev/null 2>&1 & ;; stop) echo "Stopping $DESC..." kill -9 `ps -C $BIN -o pid --no-headers` ;; restart) echo "Stopping $DESC..." kill -9 `ps -C $BIN -o pid --no-headers` echo "Starting $DESC..." $DAEMON $CONFIG > /dev/null 2>&1 & # $DAEMON $CONFIG2 > /dev/null 2>&1 & # $DAEMON $CONFIG3 > /dev/null 2>&1 & ;; *) echo "usage: /etc/init.d/shoutcast" echo "$0 {start|stop|restart}" exit 1 ;; esac exit 0 А вот процесс установки shoutcast: Создаём директорию ...