All pastes #537532 Raw Edit

Untitled

public text v1 · immutable
·published 2007-06-04 19:22 UTC
rendered paste body
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-sound/shoutcast-trans-bin/files/shoutcast_trans,v 1.4 2004/09/24 18:33:01 swegener Exp $

depend() {
        need localmount
        need shoutcast
}

checkconfig() {
        if ! [ -f /etc/shoutcast/sc_trans.conf ] ; then
                eerror "Configuration file /etc/shoutcast/sc_trans.conf does not exist!"
                return 1
        fi

        return 0
}

start() {
        checkconfig || return 1

        ebegin "Starting Shoutcast Trans"
        start-stop-daemon --start --quiet -m --pidfile /var/run/shoutcast_trans.pid --exec /usr/bin/sudo -u mythtv /opt/shoutcast/sc_trans_linux /etc/shoutcast/sc_trans.conf > /var/log/sc_trans.log &
        eend $?
}

stop() {
        ebegin "Stopping Shoutcast Trans"
        start-stop-daemon --stop --quiet --pidfile /var/run/shoutcast_trans.pid
        eend $?
}