Page 1 of 1

Gentoo ebuild for Subsonic

PostPosted: Thu Feb 10, 2011 1:04 am
by Bapabooiee
If anyone's on Gentoo, and is interested, my ebuild can be found here.

Please note that since it's somewhat of a work-in-progress, it's been hard-masked - which means you'll need to add www-apps/subsonic to package.unmask in order to use it. Though, despite this, it seems to work rather well so far.

Thanks, and let me know how it works if you decide to use it.

PostPosted: Sun Feb 13, 2011 3:22 am
by nibato
Nice work, I was actually looking for an ebuild a few weeks ago and was suprised there wasn't one yet

Re: Gentoo ebuild for Subsonic

PostPosted: Thu May 10, 2012 7:22 am
by saivert
Do you have a Gentoo OpenRC compatible init script for us as well?
I have installed it manually from the package on the subsonic site.

Made my own. Seems to work. Might need a few improvements.

Code: Select all
#!/sbin/runscript

extra_commands="depend"
pidfile=/var/run/subsonic.pid
depend() {
        need net
        use apache2 lighttpd nginx
}

start() {
        ebegin "Starting Subsonic streaming server"
        start-stop-daemon --start --pidfile /var/run/subsonic.pid --exec \
            /var/subsonic/subsonic.sh
        local i=0
        local timeout=5
        while [ ! -f /var/run/subsonic.pid ] && [ $i -le $timeout ]; do
            sleep 1
            i=$(($i + 1))
        done

        [ $timeout -gt $i ]
        eend $?
}

stop() {
        ebegin "Stopping Subsonic streaming server"
        start-stop-daemon --signal KILL --stop --pidfile /var/run/subsonic.pid
        eend $?
}


Re: Gentoo ebuild for Subsonic

PostPosted: Fri Apr 26, 2013 3:12 pm
by haven
Resurrecting an old thread but found this on google and modified it slightly (my subsonic.sh is in /opt/subsonic/):

Code: Select all
#!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

pidfile=/var/run/subsonic.pid

depend() {
        need net
}

start() {
        ebegin "Starting Subsonic streaming server"
        start-stop-daemon --start --pidfile /var/run/subsonic.pid --exec \
            /opt/subsonic/subsonic.sh -- --pidfile=/var/run/subsonic.pid
        local i=0
        local timeout=5
        while [ ! -f /var/run/subsonic.pid ] && [ $i -le $timeout ]; do
            sleep 1
            i=$(($i + 1))
        done

        [ $timeout -gt $i ]
        eend $?
}

stop() {
        ebegin "Stopping Subsonic streaming server"
        start-stop-daemon --signal KILL --stop --pidfile /var/run/subsonic.pid
        eend $?
}


Maybe this will help someone else like the original post helped me.