Gentoo ebuild for Subsonic

General discussions.

Moderator: moderators

Gentoo ebuild for Subsonic

Postby Bapabooiee » Thu Feb 10, 2011 1:04 am

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.
Bapabooiee
 
Posts: 1
Joined: Wed Feb 09, 2011 10:31 pm

Postby nibato » Sun Feb 13, 2011 3:22 am

Nice work, I was actually looking for an ebuild a few weeks ago and was suprised there wasn't one yet
Image
User avatar
nibato
 
Posts: 9
Joined: Sun Feb 13, 2011 12:33 am

Re: Gentoo ebuild for Subsonic

Postby saivert » Thu May 10, 2012 7:22 am

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 $?
}

saivert
 
Posts: 1
Joined: Thu May 10, 2012 7:20 am

Re: Gentoo ebuild for Subsonic

Postby haven » Fri Apr 26, 2013 3:12 pm

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.
haven
 
Posts: 4
Joined: Sat Feb 23, 2013 11:02 am


Return to General

Who is online

Users browsing this forum: No registered users and 20 guests