Ubuntu Server auto start program?

Discussion in 'Server Operation' started by strix, May 2, 2008.

  1. strix

    strix New Member

    I have shoutcast server on my Ubuntu 6.06.2 LTS Server (without X env.)
    I want to configure sc_serv to start every time when system boot. What is the best way to do that?
  2. falko

    falko Super Moderator ISPConfig Developer

    Does the service have a startup script in the /etc/init.d directory? If so, what's it'S filename?
  3. strix

    strix New Member


    Shoutcast (http://www.shoutcast.com/) is free internet radio broadcaster. It consist of these files
    So I found Howto for writing simple startup scripts - http://ubuntujourney.wordpress.com/2008/04/18/starting-a-program-at-boot/
    and wrote one for simple start and stop shoutcast (sc_serv) and put it in /etc/init.d, after that
    update-rc.d shoutcast defaults
    and the job was done. BUT the shoutcast is not designed to be run as a service, at boot time it wait for broadcaster application and by this way prevents the system to boot normally.
    So I removed it. I'll start shotcast by hand at every reboot.
  4. Destreyf

    Destreyf New Member

    I realize this post is well over a year old actually 2 years now, but just for people who need help, as this was the very first post i found while looking for auto starting a job/process. Please use with caution, my tests were done with Asterisk, a Voip gateway software, not shoutcast, a Music streaming software.

    Create a file such as this in your etc/init.d/
    name it "shoutcast" without the quotes
    /your/absolute/path/to/sc_serv &
    then issue the following commands in your /etc/init.d/
    chmod +x shoutcast
    update-rc.d shoutcast defaults
    This will fork your process off as a sub of root, you can also, put nuhup in front of it, to allow it to create an orphaned process independent of any system resource/user.

    This should be the basis for any program you compile by source or install from an other methods not done through the package manager.

Share This Page