diff options
author | Max Kalika <max@gentoo.org> | 2003-11-03 17:25:01 +0000 |
---|---|---|
committer | Max Kalika <max@gentoo.org> | 2003-11-03 17:25:01 +0000 |
commit | a5000a4db16ae034138745b68ee8739f84562821 (patch) | |
tree | 5b7616683803b1ecfe62df820bda516d0de616f6 /media-tv/freevo/files/freevo.rc6 | |
parent | added metadata (diff) | |
download | historical-a5000a4db16ae034138745b68ee8739f84562821.tar.gz historical-a5000a4db16ae034138745b68ee8739f84562821.tar.bz2 historical-a5000a4db16ae034138745b68ee8739f84562821.zip |
Bump to version 1.4_rc2. At the request of developers, remove the old version.
Diffstat (limited to 'media-tv/freevo/files/freevo.rc6')
-rw-r--r-- | media-tv/freevo/files/freevo.rc6 | 81 |
1 files changed, 65 insertions, 16 deletions
diff --git a/media-tv/freevo/files/freevo.rc6 b/media-tv/freevo/files/freevo.rc6 index c3d574d83618..55c9179bb4d0 100644 --- a/media-tv/freevo/files/freevo.rc6 +++ b/media-tv/freevo/files/freevo.rc6 @@ -1,27 +1,76 @@ #!/sbin/runscript # Copyright 1999-2003 Gentoo Technologies, Inc. -# Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/media-tv/freevo/files/freevo.rc6,v 1.1 2003/09/10 18:57:14 max Exp $ +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-tv/freevo/files/freevo.rc6,v 1.2 2003/11/03 17:24:58 max Exp $ depend() { - use lircd + need net + need xfs + need lircd +} + +checkconfig() { + if [ -z "${freevo}" -o "${freevo}" = "no" ] && \ + [ -z "${webserver}" -o "${webserver}" = "no" ] && \ + [ -z "${recordserver}" -o "${recordserver}" = "no" ] ; then + eerror "All services are disabled." + eerror "Please check /etc/conf.d/freevo" + return 1 + fi + + sysctl -w dev.rtc.max-user-freq=1024 &> /dev/null } start() { - export DISPLAY="" - ebegin "Setting max-user-freq" - sysctl -w dev.rtc.max-user-freq=1024 &>/dev/null - eend $? - - ebegin "Starting Freevo" - start-stop-server --start --quiet --background --make-pidfile \ - --pidfile /var/run/freevo.pid --exec /opt/freevo/freevo \ - -- &>/dev/null - eend $? + checkconfig || return 1 + + if [ "${freevo}" == "daemon" ] ; then + ebegin "Starting Freevo daemon" + /usr/bin/freevo daemon start + eend $? + elif [ "${freevo}" == "yes" ]; then + ebegin "Starting Freevo" + if egrep -q '^display.*(x11|dga)' /etc/freevo/freevo.conf ; then + /usr/bin/freevo -fs & &>/dev/null + else + /usr/bin/freevo start + fi + eend $? + fi + + if [ "${recordserver}" == "yes" ]; then + ebegin "Starting Freevo recordserver" + /usr/bin/freevo recordserver start + eend $? + fi + + if [ "${webserver}" == "yes" ]; then + ebegin "Starting Freevo webserver" + /usr/bin/freevo webserver start + eend $? + fi } stop() { - ebegin "Stopping Freevo" - start-stop-server --stop --quiet --pidfile /var/run/freevo.pid - eend $? + if [ "${webserver}" == "yes" ]; then + ebegin "Stopping Freevo webserver" + /usr/bin/freevo webserver stop + eend $? + fi + + if [ "${recordserver}" == "yes" ]; then + ebegin "Stopping Freevo recordserver" + /usr/bin/freevo recordserver stop + eend $? + fi + + if [ "${freevo}" == "daemon" ]; then + ebegin "Stopping Freevo daemon" + /usr/bin/freevo daemon stop + eend $? + elif [ "${freevo}" == "yes" ]; then + ebegin "Stopping Freevo" + /usr/bin/freevo stop + eend $? + fi } |