Loading ...
Sorry, an error occurred while loading the content.

Starting slimserver on reboot

Expand Messages
  • Michael Bell
    Thanks to all the info on this board, I got my Linstation up and going with Slimserver yesterday in just a few hours. All that s left is starting the
    Message 1 of 6 , Dec 1, 2004
    • 0 Attachment
      Thanks to all the info on this board, I got my Linstation up and
      going with Slimserver yesterday in just a few hours.

      All that's left is starting the linkstation automatically on reboot,
      I've looked but not found, any pointers please?

      Cheers,

      Mike.
    • jamy1975
      The easiest way to make this happen is to put a script in /etc/init.d that runs the commands to start slimserver. This is not the most secure method as it will
      Message 2 of 6 , Dec 1, 2004
      • 0 Attachment
        The easiest way to make this happen is to put a script in /etc/init.d
        that runs the commands to start slimserver. This is not the most
        secure method as it will run as root, but is probably the most simple.

        Jamy

        --- In LinkStation_General@yahoogroups.com, "Michael Bell" <mike@m...>
        wrote:
        >
        > Thanks to all the info on this board, I got my Linstation up and
        > going with Slimserver yesterday in just a few hours.
        >
        > All that's left is starting the linkstation automatically on reboot,
        > I've looked but not found, any pointers please?
        >
        > Cheers,
        >
        > Mike.
      • Michael Bell
        Cheers Jamy, sounds great. ... in /etc/init.d ... simple. ... ... reboot,
        Message 3 of 6 , Dec 1, 2004
        • 0 Attachment
          Cheers Jamy, sounds great.

          --- In LinkStation_General@yahoogroups.com, "jamy1975" <jamy@b...>
          wrote:
          >
          > The easiest way to make this happen is to put a script
          in /etc/init.d
          > that runs the commands to start slimserver. This is not the most
          > secure method as it will run as root, but is probably the most
          simple.
          >
          > Jamy
          >
          > --- In LinkStation_General@yahoogroups.com, "Michael Bell"
          <mike@m...>
          > wrote:
          > >
          > > Thanks to all the info on this board, I got my Linstation up and
          > > going with Slimserver yesterday in just a few hours.
          > >
          > > All that's left is starting the linkstation automatically on
          reboot,
          > > I've looked but not found, any pointers please?
          > >
          > > Cheers,
          > >
          > > Mike.
        • gotsprings12
          Could there be a: do this, now this set of directions for this auto start script? Springs
          Message 4 of 6 , Dec 1, 2004
          • 0 Attachment
            Could there be a: "do this, now this set" of directions for this auto
            start script?

            Springs
            --- In LinkStation_General@yahoogroups.com, "Michael Bell" <mike@m...>
            wrote:
            >
            > Cheers Jamy, sounds great.
            >
            > --- In LinkStation_General@yahoogroups.com, "jamy1975" <jamy@b...>
            > wrote:
            > >
            > > The easiest way to make this happen is to put a script
            > in /etc/init.d
            > > that runs the commands to start slimserver. This is not the most
            > > secure method as it will run as root, but is probably the most
            > simple.
            > >
            > > Jamy
            > >
            > > --- In LinkStation_General@yahoogroups.com, "Michael Bell"
            > <mike@m...>
            > > wrote:
            > > >
            > > > Thanks to all the info on this board, I got my Linstation up and
            > > > going with Slimserver yesterday in just a few hours.
            > > >
            > > > All that's left is starting the linkstation automatically on
            > reboot,
            > > > I've looked but not found, any pointers please?
            > > >
            > > > Cheers,
            > > >
            > > > Mike.
          • Iain Stevenson
            First step is probably to get a script that will start and stop slimserver from the command line. Then you ll need to create some symlinks in /etc/rc.d/rc2.d
            Message 5 of 6 , Dec 2, 2004
            • 0 Attachment
              First step is probably to get a script that will start and stop slimserver
              from the command line. Then you'll need to create some symlinks in
              /etc/rc.d/rc2.d and /etc/rc.d/rc6.d. Try copying the script from below
              (which I hacked from my redhat system running slimserver) and save it on
              the LinkStation as "slimstart" or suchlike. Then chmod 755 slimstart.
              Then ./slimstart start and see if slimserver starts up. Then stop it with
              ./slimstart stop. If that works you can automate the process ...

              I hope this works but unfortunately I don't have slimserver on my
              LinkStation so YMMV.

              Iain


              --On Thursday, December 2, 2004 4:10 am +0000 gotsprings12
              <cnichol@...> wrote:

              >
              >
              > Could there be a: "do this, now this set" of directions for this auto
              > start script?
              >
              > Springs



              #!/bin/bash
              #
              # slimserver.init This shell script takes care of starting and stopping
              # the Slim streaming MP3 server.
              #
              # chkconfig: 345 80 30
              # description: Slim streaming MP3 server
              # processname: slimserver.pl
              # config: /etc/slimserver.conf

              RETVAL=0
              prog="SLIMSERVER"

              SLIMSERVER_USER="slimserver"
              SLIMSERVER_HOME="/usr/local/slimserver"
              SLIMSERVER_CFG="/etc/slimserver.conf"
              SLIMSERVER_LOG="/tmp/slimserver.log"
              SLIMSERVER_ARGS="--daemon --prefsfile=$SLIMSERVER_CFG
              --logfile=$SLIMSERVER_LOG"
              SLIMSERVER_BIN="$SLIMSERVER_HOME/slimserver.pl"

              [ -x $SLIMSERVER_BIN -a -f $SLIMSERVER_CFG ] || exit 5

              start() {
              echo -n "Starting SlimServer: "
              $SLIMSERVER_BIN --user $SLIMSERVER_USER $SLIMSERVER_ARGS
              RETVAL=$?
              echo
              [ $RETVAL -eq 0 ] && touch /var/lock/subsys/slimserver
              return $RETVAL
              # echo_success
              }

              stop() {
              echo -n "Shutting down SlimServer: "
              killall -9 slimserver.pl
              RETVAL=$?
              echo
              [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/slimserver
              return $RETVAL
              }

              # See how we were called.
              case "$1" in
              start)
              start
              ;;
              stop)
              stop
              ;;
              restart|reload)
              stop
              start
              RETVAL=$?
              ;;
              status)
              status $SLIMSERVER_BIN
              RETVAL=$?
              ;;
              *)
              echo "Usage: $0 {start|stop|restart|status}"
              exit 1
              esac
              exit $RETVAL
            • jamy1975
              I also tried moving the slimserver script from my redhat box over.. There are quite a few differences, that prevent it from working. Below is the output when
              Message 6 of 6 , Dec 3, 2004
              • 0 Attachment
                I also tried moving the slimserver script from my redhat box over..
                There are quite a few differences, that prevent it from working. Below
                is the output when the script is run.

                ./slimserver: /sbin/consoletype: No such file or directory
                ./slimserver: /etc/sysconfig/network: No such file or directory
                ./slimserver: [: =: unary operator expected
                Starting SlimServer: ./slimserver: initlog: command not found
                ./slimserver: initlog: command not found
                FAILED]

                Very odd changes from default linux installs. After these are fixed,
                many more items could possibly be different. It may be worth
                completely rewriting the script.

                Jamy


                --- In LinkStation_General@yahoogroups.com, Iain Stevenson <iain@i...>
                wrote:
                >
                > First step is probably to get a script that will start and stop
                slimserver
                > from the command line. Then you'll need to create some symlinks in
                > /etc/rc.d/rc2.d and /etc/rc.d/rc6.d. Try copying the script from below
                > (which I hacked from my redhat system running slimserver) and save
                it on
                > the LinkStation as "slimstart" or suchlike. Then chmod 755 slimstart.
                > Then ./slimstart start and see if slimserver starts up. Then stop
                it with
                > ./slimstart stop. If that works you can automate the process ...
                >
                > I hope this works but unfortunately I don't have slimserver on my
                > LinkStation so YMMV.
                >
                > Iain
                >
                >
                > --On Thursday, December 2, 2004 4:10 am +0000 gotsprings12
                > <cnichol@r...> wrote:
                >
                > >
                > >
                > > Could there be a: "do this, now this set" of directions for this auto
                > > start script?
                > >
                > > Springs
                >
                >
                >
                > #!/bin/bash
                > #
                > # slimserver.init This shell script takes care of starting and stopping
                > # the Slim streaming MP3 server.
                > #
                > # chkconfig: 345 80 30
                > # description: Slim streaming MP3 server
                > # processname: slimserver.pl
                > # config: /etc/slimserver.conf
                >
                > RETVAL=0
                > prog="SLIMSERVER"
                >
                > SLIMSERVER_USER="slimserver"
                > SLIMSERVER_HOME="/usr/local/slimserver"
                > SLIMSERVER_CFG="/etc/slimserver.conf"
                > SLIMSERVER_LOG="/tmp/slimserver.log"
                > SLIMSERVER_ARGS="--daemon --prefsfile=$SLIMSERVER_CFG
                > --logfile=$SLIMSERVER_LOG"
                > SLIMSERVER_BIN="$SLIMSERVER_HOME/slimserver.pl"
                >
                > [ -x $SLIMSERVER_BIN -a -f $SLIMSERVER_CFG ] || exit 5
                >
                > start() {
                > echo -n "Starting SlimServer: "
                > $SLIMSERVER_BIN --user $SLIMSERVER_USER $SLIMSERVER_ARGS
                > RETVAL=$?
                > echo
                > [ $RETVAL -eq 0 ] && touch /var/lock/subsys/slimserver
                > return $RETVAL
                > # echo_success
                > }
                >
                > stop() {
                > echo -n "Shutting down SlimServer: "
                > killall -9 slimserver.pl
                > RETVAL=$?
                > echo
                > [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/slimserver
                > return $RETVAL
                > }
                >
                > # See how we were called.
                > case "$1" in
                > start)
                > start
                > ;;
                > stop)
                > stop
                > ;;
                > restart|reload)
                > stop
                > start
                > RETVAL=$?
                > ;;
                > status)
                > status $SLIMSERVER_BIN
                > RETVAL=$?
                > ;;
                > *)
                > echo "Usage: $0 {start|stop|restart|status}"
                > exit 1
                > esac
                > exit $RETVAL
              Your message has been successfully submitted and would be delivered to recipients shortly.