Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Shoutcast startup script

  1. #1

    Default Shoutcast startup script

    Anybody out there have a shoutcast server that they were able to get to startup with the system.

    I have been trying many many things and all with no luck

    I found this using google

    Code:
    #!/bin/sh
    # description: SHOUTcast streaming MP3 radio station server
    # chkconfig: 2345 99 00
    
    case "$1" in
    'start')
            cd /home/shoutcast/bin && ./sc_serv
            touch /var/lock/subsys/shoutcast
            ;;
    'stop')
            rm -f /var/lock/subsys/shoutcast
            ;;
    *)
            echo "Usage: $0 { start | stop }"
            ;;
    esac
    exit 0
    named shoutcast and placed in /etc/init.d
    chmod 755

    then made a simlink to /etc/init.d/rc3.d

    ln -s /etc/init.d/shoutcast /etc/rc.d/rc3.d/S08shoutcast
    S08 was open and it is after network startup wich is S06

    I restart the computer and to my dismay it does not autostart.

    Go to yast to check runlevels and it is listed and it says "yes" for startup.. I went to advanced and it conferms is in runlevel 3 (the runlevel i use)

    If I go to enable in yast a box comes up and says shoutcast start and does not go away, if i hit F10 it gives an error saying NULL and leaves you to believe the server is not started. but it is. I can see it in ps -ef and i can also connect to it from my windows laptop with winamp

    Anyone succesfully get a shoutcast server to autostart.. Please help.

    Thanks

  2. #2
    ab@novell.com NNTP User

    Default Re: Shoutcast startup script

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    If you run the script from the command line do you get any errors? Does
    it work?

    Good luck.





    geoffmcc wrote:
    | Anybody out there have a shoutcast server that they were able to get to
    | startup with the system.
    |
    | I have been trying many many things and all with no luck
    |
    | I found this using google
    |
    |
    | Code:
    | --------------------
    | #!/bin/sh
    | # description: SHOUTcast streaming MP3 radio station server
    | # chkconfig: 2345 99 00
    |
    | case "$1" in
    | 'start')
    | cd /home/shoutcast/bin && ./sc_serv
    | touch /var/lock/subsys/shoutcast
    | ;;
    | 'stop')
    | rm -f /var/lock/subsys/shoutcast
    | ;;
    | *)
    | echo "Usage: $0 { start | stop }"
    | ;;
    | esac
    | exit 0
    |
    | --------------------
    |
    |
    | named shoutcast and placed in /etc/init.d
    | chmod 755
    |
    | then made a simlink to /etc/init.d/rc3.d
    |
    |> ln -s /etc/init.d/shoutcast /etc/rc.d/rc3.d/S08shoutcast S08 was open
    and it is after network startup wich is S06
    |
    | I restart the computer and to my dismay it does not autostart.
    |
    | Go to yast to check runlevels and it is listed and it says "yes" for
    | startup.. I went to advanced and it conferms is in runlevel 3 (the
    | runlevel i use)
    |
    | If I go to enable in yast a box comes up and says shoutcast start and
    | does not go away, if i hit F10 it gives an error saying NULL and leaves
    | you to believe the server is not started. but it is. I can see it in ps
    | -ef and i can also connect to it from my windows laptop with winamp
    |
    | Anyone succesfully get a shoutcast server to autostart.. Please help.
    |
    | Thanks
    |
    |
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.2 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

    iD8DBQFIatxa3s42bA80+9kRAvNiAJ91QAiYJDLYKOoboQzfI6M8NbzBSACeJY/s
    wR0zPaQE8pIm5gDthGeMfzQ=
    =G+oK
    -----END PGP SIGNATURE-----

  3. #3

    Default Re: Shoutcast startup script

    OK I got it figured out. I placed the shoutcast script in /etc/init.d

    then ran command:
    Code:
    chkconfig -a shoutcast
    restarted and shoutcast server has autostarted,
    now the problem i face is that it is running under root.

    Im thinking thats not the best of ideas. Any thoughts

  4. #4
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    Default Re: Shoutcast startup script

    You should use the utility program startproc which is designed to handle all the various settings a server process might take. Also creates/checks pid files, etc. See the man page for usage info, and existing init scripts for examples of use.

  5. #5

    Default Re: Shoutcast startup script

    Ken you are awesome. I was wondering when you were gonna chime in with your helpful advice. I should just PM you rather than post, lol

    I read threw man page.. I think i can figure that out.
    I just removed everything that i did, and restarted to make sure it dont startup again then i will give it a try


    Thanks again

  6. #6

    Default Re: Shoutcast startup script

    well i got it to start under the right user but it is not detecting the conf file. What do i need to add after path to sc_srv to let it know to use sc_serv.conf

    i thought it was && but thats not right

    actually now that i look closer, it says unable to find sc_serv.conf even though it is in same dir as sc_serv ????

  7. #7

    Default Re: Shoutcast startup script

    ugh
    Code:
    startproc -u username /home/username/bin/sc_serv

    starts the server but states, cannot find sc_serv.conf using defaults... even though the conf file is in same directory as sc_serv

    so then i try

    Code:
    startproc -u username /home/username/bin/sc_serv > /home/username/bin/sc_serv.conf
    same thing. i cant get this to notice the conf file that is in the same directory as the server... i think im gonna give up for the night, will check back tomorrow

  8. #8
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    Default Re: Shoutcast startup script

    startproc doesn't do any chdir or anything like that so the current directory is wherever the init script is run. sc_serv might have an option which might set the config file, otherwise you should do:

    Code:
    cd /home/username/bin; startproc ... ./sc_serv
    BTW, I think your > redirection wiped out the config file in your last experiment.

  9. #9

    Default Re: Shoutcast startup script

    still no go, no matter what i do it does not find the config file even though it is in same directory

  10. #10
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    Default Re: Shoutcast startup script

    Have you changed it to run under another account, and if so, is the config file readable by that account?

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •