Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Jahf
    Guest

    Changes to /etc/init.d/slimserver for SuSE

    The RPM for slimserver mostly works on my SuSE 8.1 based system
    (actually Java Desktop System, based on SuSE Linux Desktop).

    However the /etc/init.d/slimserver script never quite worked so I used
    to start the server by hand.

    I've taken a little time to edit the script. I -believe- it now works as
    before on Red Hat systems and definitely now works on my system.

    Could someone who has been using /etc/init.d/slimserver with success
    from version 5.2.1 doublecheck and see that this works on their system?

    I don't know if it works on SuSE 9.x as I don't have the slimserver on
    that system right now, so if someone wants to check that, too, cool.

    Things that should work on both platforms:

    ....
    # all command options:
    /etc/init.d/slimserver start
    /etc/init.d/slimserver restart
    /etc/init.d/slimserver status
    /etc/init.d/slimserver stop

    # adding via chkconfig (Fedora has this, right? not sure)
    # should add to runlevels 3 and 5 without needing to specify
    chkconfig -a slimserver

    # deleting via chkconfig
    chkconfig -d slimserver

    # GUI runlevel editors should also work on both platforms
    ....

    If it works or doesn't, please respond to this thread. If I get reports
    of it working on both, it would be cool to have the new version stuck in
    the nightlies for further testing and hopefully rolled into production
    as it make the RPM truly noarch and compatible with at least these 2
    systems.

    /Geoff

    #!/bin/bash
    #
    # slimserver.init This shell script takes care of starting and stopping
    # the Slim streaming MP3 server.
    #
    # Info for RedHat / Fedora style init scripts
    #
    # chkconfig: 345 80 30
    # description: Slim streaming MP3 server
    # processname: slimserver.pl
    # config: /etc/slimserver.conf
    #
    # The following helps SuSE / UnitedLinux init scripts
    # /etc/init.d/slimserver
    #
    ### BEGIN INIT INFO
    # Provides: slimserver
    # Required-Start: $network
    # X-UnitedLinux-Should-Start:
    # Required-Stop:
    # Default-Start: 3 5
    # Default-Stop: 1 2 6
    # Description: start the Slim Server
    ### END INIT INFO


    # Are we Red Hat/Fedora or SuSE?
    if [ -f /etc/SuSE-release ]; then
    SUSE=1
    DAEMON='start_daemon -u'
    else
    REDHAT=1
    DAEMON='daemon --user'
    fi

    if [ $REDHAT ]; then
    echo "... detected Red Hat / Fedora style distro ..."
    # Source function library.
    . /etc/rc.d/init.d/functions

    # Source networking configuration.
    if [ -f /etc/sysconfig/network ]; then
    . /etc/sysconfig/network
    fi

    # Networking check is different for SuSE, so moved the check here
    # Check that networking is up for Red Hat
    [ ${NETWORKING} = "no" ] && exit 0
    fi

    if [ $SUSE ]; then
    echo "... detected SuSE style distro ..."
    # Source rc status functions
    . /etc/rc.status

    # Source networking functions
    . /etc/sysconfig/network/scripts/functions

    # check if networking is up, not counting localhost
    if [ ! `get_active_ifaces | grep -v 'lo'` ]; then
    exit 0
    fi
    fi

    # We do this regardless of distro
    if [ -f /etc/sysconfig/slimserver ]; then
    . /etc/sysconfig/slimserver
    fi


    RETVAL=0
    prog="SLIMSERVER"

    SLIMSERVER_BIN="$SLIMSERVER_HOME/slimserver.pl"

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

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

    stop() {
    echo -n "Shutting down SlimServer: "
    killproc $SLIMSERVER_BIN
    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)
    if [ $REDHAT ]; then
    status $SLIMSERVER_BIN
    RETVAL=$?
    fi
    if [ $SUSE ]; then
    rc_status -v
    fi
    ;;
    *)
    echo "Usage: $0 {start|stop|restart|status}"
    exit 1
    esac
    exit $RETVAL

  2. #2
    Victor Brilon
    Guest

    Changes to /etc/init.d/slimserver for SuSE

    Geoff,

    This looks very cool. Any chance you could make a diff of the changes
    you created against the current CVS? I'd like to make sure that nothing
    in there would inadvertantly break the RH startup scripts.

    Victor

    Jahf wrote:
    > The RPM for slimserver mostly works on my SuSE 8.1 based system
    > (actually Java Desktop System, based on SuSE Linux Desktop).
    >
    > However the /etc/init.d/slimserver script never quite worked so I used
    > to start the server by hand.
    >
    > I've taken a little time to edit the script. I -believe- it now works as
    > before on Red Hat systems and definitely now works on my system.
    >
    > Could someone who has been using /etc/init.d/slimserver with success
    > from version 5.2.1 doublecheck and see that this works on their system?
    >
    > I don't know if it works on SuSE 9.x as I don't have the slimserver on
    > that system right now, so if someone wants to check that, too, cool.
    >
    > Things that should work on both platforms:
    >
    > ...
    > # all command options:
    > /etc/init.d/slimserver start
    > /etc/init.d/slimserver restart
    > /etc/init.d/slimserver status
    > /etc/init.d/slimserver stop
    >
    > # adding via chkconfig (Fedora has this, right? not sure)
    > # should add to runlevels 3 and 5 without needing to specify
    > chkconfig -a slimserver
    >
    > # deleting via chkconfig
    > chkconfig -d slimserver
    >
    > # GUI runlevel editors should also work on both platforms
    > ...
    >
    > If it works or doesn't, please respond to this thread. If I get reports
    > of it working on both, it would be cool to have the new version stuck in
    > the nightlies for further testing and hopefully rolled into production
    > as it make the RPM truly noarch and compatible with at least these 2
    > systems.
    >
    > /Geoff
    >
    >
    > ------------------------------------------------------------------------
    >
    > #!/bin/bash
    > #
    > # slimserver.init This shell script takes care of starting and stopping
    > # the Slim streaming MP3 server.
    > #
    > # Info for RedHat / Fedora style init scripts
    > #
    > # chkconfig: 345 80 30
    > # description: Slim streaming MP3 server
    > # processname: slimserver.pl
    > # config: /etc/slimserver.conf
    > #
    > # The following helps SuSE / UnitedLinux init scripts
    > # /etc/init.d/slimserver
    > #
    > ### BEGIN INIT INFO
    > # Provides: slimserver
    > # Required-Start: $network
    > # X-UnitedLinux-Should-Start:
    > # Required-Stop:
    > # Default-Start: 3 5
    > # Default-Stop: 1 2 6
    > # Description: start the Slim Server
    > ### END INIT INFO
    >
    >
    > # Are we Red Hat/Fedora or SuSE?
    > if [ -f /etc/SuSE-release ]; then
    > SUSE=1
    > DAEMON='start_daemon -u'
    > else
    > REDHAT=1
    > DAEMON='daemon --user'
    > fi
    >
    > if [ $REDHAT ]; then
    > echo "... detected Red Hat / Fedora style distro ..."
    > # Source function library.
    > . /etc/rc.d/init.d/functions
    >
    > # Source networking configuration.
    > if [ -f /etc/sysconfig/network ]; then
    > . /etc/sysconfig/network
    > fi
    >
    > # Networking check is different for SuSE, so moved the check here
    > # Check that networking is up for Red Hat
    > [ ${NETWORKING} = "no" ] && exit 0
    > fi
    >
    > if [ $SUSE ]; then
    > echo "... detected SuSE style distro ..."
    > # Source rc status functions
    > . /etc/rc.status
    >
    > # Source networking functions
    > . /etc/sysconfig/network/scripts/functions
    >
    > # check if networking is up, not counting localhost
    > if [ ! `get_active_ifaces | grep -v 'lo'` ]; then
    > exit 0
    > fi
    > fi
    >
    > # We do this regardless of distro
    > if [ -f /etc/sysconfig/slimserver ]; then
    > . /etc/sysconfig/slimserver
    > fi
    >
    >
    > RETVAL=0
    > prog="SLIMSERVER"
    >
    > SLIMSERVER_BIN="$SLIMSERVER_HOME/slimserver.pl"
    >
    > [ -x $SLIMSERVER_BIN -a -f $SLIMSERVER_CFG ] || exit 5
    >
    > start() {
    > echo -n "Starting SlimServer: "
    > $DAEMON $SLIMSERVER_USER $SLIMSERVER_BIN $SLIMSERVER_ARGS
    > RETVAL=$?
    > echo
    > [ $RETVAL -eq 0 ] && touch /var/lock/subsys/slimserver
    > return $RETVAL
    > # echo_success
    > }
    >
    > stop() {
    > echo -n "Shutting down SlimServer: "
    > killproc $SLIMSERVER_BIN
    > 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)
    > if [ $REDHAT ]; then
    > status $SLIMSERVER_BIN
    > RETVAL=$?
    > fi
    > if [ $SUSE ]; then
    > rc_status -v
    > fi
    > ;;
    > *)
    > echo "Usage: $0 {start|stop|restart|status}"
    > exit 1
    > esac
    > exit $RETVAL
    >
    >
    > ------------------------------------------------------------------------
    >
    >

  3. #3
    Geoff
    Guest

    Changes to /etc/init.d/slimserver for SuSE

    Victor Brilon wrote:
    > Geoff,
    >
    > This looks very cool. Any chance you could make a diff of the changes
    > you created against the current CVS? I'd like to make sure that nothing
    > in there would inadvertantly break the RH startup scripts.
    >
    > Victor


    Hopefully diff'ing the nightly from yesterday will do It is attached.

    I haven't gotten any "works on redhat/fedora" confirmations ... once I
    do, what is the process for getting it into a nightly for checking?

    Also, I think the RPM spec file may be a bit SuSE unfriendly ... I
    installed a fresh OS last night (not by choice, long story) and when I
    installed Slimserver (7/30 nightly) it made a directory called
    "/etc/init.d/init.d" and put 'slimserver' in there. I'm -assuming- that
    RH/Fedora don't have a /etc/init.d/init.d directory, and that it should
    always go in /etc/init.d ... is there a way for me to see the .spec file?

    /Geoff

  4. #4
    Geoff
    Guest

    Changes to /etc/init.d/slimserver for SuSE

    Victor Brilon wrote:
    > Geoff,
    >
    > This looks very cool. Any chance you could make a diff of the changes
    > you created against the current CVS? I'd like to make sure that nothing
    > in there would inadvertantly break the RH startup scripts.
    >
    > Victor


    Hopefully diff'ing the nightly from yesterday will do It is attached.

    I haven't gotten any "works on redhat/fedora" confirmations ... once I
    do, what is the process for getting it into a nightly for checking?

    Also, I think the RPM spec file may be a bit SuSE unfriendly ... I
    installed a fresh OS last night (not by choice, long story) and when I
    installed Slimserver (7/30 nightly) it made a directory called
    "/etc/init.d/init.d" and put 'slimserver' in there. I'm -assuming- that
    RH/Fedora don't have a /etc/init.d/init.d directory, and that it should
    always go in /etc/init.d ... is there a way for me to see the .spec file?

    /Geoff

  5. #5
    Victor Brilon
    Guest

    Changes to /etc/init.d/slimserver for SuSE

    Geoff,


    Geoff wrote:
    > I haven't gotten any "works on redhat/fedora" confirmations ... once I
    > do, what is the process for getting it into a nightly for checking?


    Dean is the guys who ok's the changes and checks them in.

    > is there a way for me to see the .spec file?


    If you're looking in the nightly CVS, it's under
    platforms/redhat/slimserver.spec.build

    Victor

  6. #6
    Geoff
    Guest

    Changes to /etc/init.d/slimserver for SuSE

    Minor change ... missing the "" around the interface test results caused
    an error message. It worked, but now it works without the error.


    Victor Brilon wrote:
    > Geoff,
    >
    >
    > Geoff wrote:
    >
    >> I haven't gotten any "works on redhat/fedora" confirmations ... once I
    >> do, what is the process for getting it into a nightly for checking?

    >
    >
    > Dean is the guys who ok's the changes and checks them in.
    >
    >> is there a way for me to see the .spec file?

    >
    >
    > If you're looking in the nightly CVS, it's under
    > platforms/redhat/slimserver.spec.build
    >
    > Victor



    #!/bin/bash
    #
    # slimserver.init This shell script takes care of starting and stopping
    # the Slim streaming MP3 server.
    #
    # Info for RedHat / Fedora style init scripts
    #
    # chkconfig: 345 80 30
    # description: Slim streaming MP3 server
    # processname: slimserver.pl
    # config: /etc/slimserver.conf
    #
    # The following helps SuSE / UnitedLinux init scripts
    # /etc/init.d/slimserver
    #
    ### BEGIN INIT INFO
    # Provides: slimserver
    # Required-Start: $network
    # X-UnitedLinux-Should-Start:
    # Required-Stop:
    # Default-Start: 3 5
    # Default-Stop: 1 2 6
    # Description: start the Slim Server
    ### END INIT INFO


    # Are we Red Hat/Fedora or SuSE?
    if [ -f /etc/SuSE-release ]; then
    SUSE=1
    DAEMON='start_daemon -u'
    else
    REDHAT=1
    DAEMON='daemon --user'
    fi

    if [ $REDHAT ]; then
    echo "... detected Red Hat / Fedora style distro ..."
    # Source function library.
    . /etc/rc.d/init.d/functions

    # Source networking configuration.
    if [ -f /etc/sysconfig/network ]; then
    . /etc/sysconfig/network
    fi

    # Networking check is different for SuSE, so moved the check here
    # Check that networking is up for Red Hat
    [ ${NETWORKING} = "no" ] && exit 0
    fi

    if [ $SUSE ]; then
    echo "... detected SuSE style distro ..."
    # Source rc status functions
    . /etc/rc.status

    # Source networking functions
    . /etc/sysconfig/network/scripts/functions

    # check if networking is up, not counting localhost
    if [ ! "`get_active_ifaces | /bin/grep -v 'lo'`" ]; then
    exit 0
    fi
    fi

    # We do this regardless of distro
    if [ -f /etc/sysconfig/slimserver ]; then
    . /etc/sysconfig/slimserver
    fi


    RETVAL=0
    prog="SLIMSERVER"

    SLIMSERVER_BIN="$SLIMSERVER_HOME/slimserver.pl"

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

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

    stop() {
    echo -n "Shutting down SlimServer: "
    killproc $SLIMSERVER_BIN
    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)
    if [ $REDHAT ]; then
    status $SLIMSERVER_BIN
    RETVAL=$?
    fi
    if [ $SUSE ]; then
    rc_status -v
    fi
    ;;
    *)
    echo "Usage: $0 {start|stop|restart|status}"
    exit 1
    esac
    exit $RETVAL

  7. #7
    Member
    Join Date
    Dec 2005
    Location
    Netherlands
    Posts
    63
    Small compatibility message: this script also works on SuSE 10

  8. #8
    Junior Member
    Join Date
    Dec 2005
    Posts
    7

    get_active_ifaces: command not found

    on suse linux 10.0 i have the following error message:
    "get_active_ifaces: command not found"
    and the slimserver starters not.
    which I have made wrong? otherwise no problems with the system exist.

    richard from switzerland

  9. #9
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,388

    Re: Changes to /etc/init.d/slimserver for SuSE

    Richard

    > on suse linux 10.0 i have the following error message:


    As far as I know the rpm doesn't work for suse without manual changes.
    Please have a look at the wiki
    (http://wiki.slimdevices.com/index.cg...StartupScripts) - this is for
    suse 9.3, but it might help with 10, too.

    Greetings from your beloved neighbouring canton Aargau ;-)

    --

    Michael

    -----------------------------------------------------------
    Help translate SlimServer by using the
    StringEditor Plugin (http://www.herger.net/slim/)

  10. #10
    Junior Member
    Join Date
    Dec 2005
    Posts
    7

    Danke

    danke michale

    dies funktioniert. nun kann ich weiter Řben.

    de richard us em aargovialand

Posting Permissions

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