Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Technical Support

Reply
Thread Tools Search this Thread Display Modes
Old 17th November 2014, 05:42   #1
Kevin1234
Junior Member
 
Join Date: Feb 2012
Posts: 7
Boot-script to run Shoutcast-server 1.9.8 on Ubuntu Linux 14.04.1

Hello,

I try to run Shoutcast-server 1.9.8 to run on Ubuntu Linux 14.04.1 (64bit) with Webmin v1.710. I want to setup an boot-script. The boot-script I have is:


# Shoutcast
#
# Shoutcast

description "Shoutcast"

start on runlevel [2345]
#stop on runlevel [!2345]

pre-start script
start on runlevel [2345]

stop on runlevel [!2345]

end script

exec /home/shoutcast/sc_serv /home/shoutcast/sc_serv.conf


But when I try to start Shoutcast i get the message:

Starting service Shoutcast ..

initctl: Job failed to start

.. failed!



I hope someone can help me to solve my problem.


Thanks,
Kevin
Kevin1234 is offline   Reply With Quote
Old 17th November 2014, 12:34   #2
DrO
 
Join Date: Sep 2003
Posts: 27,873
don't use 1.x and instead try doing it with the 2.x DNAS.
DrO is offline   Reply With Quote
Old 18th November 2014, 00:13   #3
Kevin1234
Junior Member
 
Join Date: Feb 2012
Posts: 7
I did install SHOUTcast Server v2.4.2.167/posix(linux x64), as you suggested. It's running. But I don't see a SHOUTcast boot-script in the Bootup and Shutdown-list. And the script shown in my first post doesn't work. When setting up the server I used the command sudo sh setup.sh. And then had the use my browser to setup the rest. But I don't know if the server will reboot without the boot-script. I didn't figure that out, yet. I also didn't figure out yet how to insert the introfile for stream_1. I guess the answers can be found in the manual.
Kevin1234 is offline   Reply With Quote
Old 18th November 2014, 00:16   #4
DrO
 
Join Date: Sep 2003
Posts: 27,873
i didn't say it has such a script - i was saying to implement what you want with the 2.x DNAS instead of the 1.x DNAS.
DrO is offline   Reply With Quote
Old 18th November 2014, 00:42   #5
Kevin1234
Junior Member
 
Join Date: Feb 2012
Posts: 7
You didn't see that, that's true.
Kevin1234 is offline   Reply With Quote
Old 18th November 2014, 10:00   #6
neralex
Major Dude
 
Join Date: Mar 2011
Posts: 576
Her you will find a example http://mobiarch.wordpress.com/2014/0...-ubuntu-14-04/

I'm not familiar with ubuntu but it seems for debian is that the same way. I'm running the DNAS v2 as deamon with this init.d script:

PHP Code:
#! /bin/sh
### BEGIN INIT INFO
# Provides:          sc_serv
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: startscript sc_serv
# Description:       startscript for sc_serv (DNASv2)
### END INIT INFO

# Author: your_name <your_name@your-host.tld>

HOME="/home/shoutcast"
USER="shoutcast"
DESC="shoutcast stream"
NAME="sc_serv"
SCRIPTNAME="/etc/init.d/$NAME"

do_start()
{
    
su $USER -"cd $HOME; ./sc_serv daemon ./sc_serv.conf"
}

do_stop()
{
    
kill -`cat /home/shoutcast/sc_serv_8000.pid# 8000 = port > use here the added port from your sc_serv.conf
}

case 
"$1" in
start
)
        echo 
"Starting $DESC $NAME"
        
do_start
;;
stop)
        echo 
"Stopping $DESC $NAME"
        
do_stop
;;
restart)
        echo 
"Stopping $DESC $NAME"
        
do_stop
        
echo "Starting $DESC $NAME"
        
do_start
;;
*)
        echo 
"Usage: $SCRIPTNAME {start|stop|restart}"
esac 
neralex is offline   Reply With Quote
Old 2nd December 2014, 05:27   #7
Kevin1234
Junior Member
 
Join Date: Feb 2012
Posts: 7
@neralex

The script you posted here works fine on ubuntu.

Thanks!

Kevin
Kevin1234 is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Technical Support

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump