diff options
Diffstat (limited to 'media-tv/mythtv/files')
-rw-r--r-- | media-tv/mythtv/files/mythbackend.conf-r1 | 19 | ||||
-rw-r--r-- | media-tv/mythtv/files/mythbackend.init-r1 | 70 | ||||
-rw-r--r-- | media-tv/mythtv/files/mythtv.logrotate.d-r3 | 20 |
3 files changed, 89 insertions, 20 deletions
diff --git a/media-tv/mythtv/files/mythbackend.conf-r1 b/media-tv/mythtv/files/mythbackend.conf-r1 new file mode 100644 index 000000000000..3857ae74e46f --- /dev/null +++ b/media-tv/mythtv/files/mythbackend.conf-r1 @@ -0,0 +1,19 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# Accepts any valid combination of logging options to mythbackend +# To get a valid list run: /usr/bin/mythbackend -v help +#MYTHBACKEND_VERBOSE="general" + +# Configures where mythbackend logs +# Valid values: +# * files - logs each individual daemon in /var/log/mythtv (default) +# * database - logs into the database +# * syslog FACILITY - logs to syslog using FACILITY (see syslog(3)) +# * console - logs only to the console (no mythlogserver) +#MYTHBACKEND_LOGGING="files" + +# Allows you to pass specific startup options to mythbackend +# e.g. --noupnp +#MYTHBACKEND_OPTS="" diff --git a/media-tv/mythtv/files/mythbackend.init-r1 b/media-tv/mythtv/files/mythbackend.init-r1 new file mode 100644 index 000000000000..e7bbeb186e93 --- /dev/null +++ b/media-tv/mythtv/files/mythbackend.init-r1 @@ -0,0 +1,70 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +description="MythTV backend recording daemon" +extra_commands="resched upnprebuild" +description_resched="Forces the recording scheduler to update" +description_upnprebuild="Rebuilds the UPnP media cache" + +depend() { + # mythbackend doesn't need to run on the same machine that + # mysql runs on. so its use for that reason + use logger net.lo mysql LCDd +} + +start() { + local logging= + + [ -z "${MYTHBACKEND_VERBOSE}" ] && \ + MYTHBACKEND_VERBOSE="general" + [ -z "${MYTHBACKEND_LOGGING}" ] && \ + MYTHBACKEND_LOGGING="files" + case "${MYTHBACKEND_LOGGING}" in + database) logging="--enable-dblog" ;; + syslog\ *) logging="--${MYTHBACKEND_LOGGING}" ;; + files) logging="--logpath /var/log/mythtv" ;; + console) logging="--nologserver" ;; + *) + eerror "Invalid MYTHBACKEND_LOGGING value" + exit 1 + ;; + esac + + #fixes for bug #101308 + unset DISPLAY + unset SESSION_MANAGER + + # Work around any strange permissions that may be on these files. + [ "x${MYTHBACKEND_LOGGING}" = "xfiles" ] && \ + checkpath --dir --owner mythv:video --mode 0664 /var/log/mythtv + checkpath --dir --owner mythv:video --mode 0664 /home/mythtv + + ebegin "Starting MythTV Backend" + start-stop-daemon --start --quiet --exec /usr/bin/mythbackend \ + --pidfile /var/run/mythbackend.pid -- \ + --daemon --pidfile /var/run/mythbackend.pid --user mythtv:video \ + --verbose ${MYTHBACKEND_VERBOSE} \ + ${logging} ${MYTHBACKEND_OPTS} + eend $? +} + +stop() { + ebegin "Stopping MythTV Backend" + start-stop-daemon --stop --retry 10 --progress \ + --pidfile=/var/run/mythbackend.pid + eend $? +} + +resched() { + ebegin "Updating the recording scheduler" + /usr/bin/mythbackend --resched + eend $? +} + +upnprebuild() { + ebegin "Rebuilding UPnP media cache" + /usr/bin/mythbackend --upnprebuild + eend $? +} diff --git a/media-tv/mythtv/files/mythtv.logrotate.d-r3 b/media-tv/mythtv/files/mythtv.logrotate.d-r3 deleted file mode 100644 index 220776a1d087..000000000000 --- a/media-tv/mythtv/files/mythtv.logrotate.d-r3 +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -/var/log/mythtv/*.log { - weekly - rotate 8 - nocompress - nocreate - notifempty - sharedscripts - missingok - olddir /var/log/mythtv/old - postrotate - killall -HUP mythfrontend - killall -HUP mythbackend - killall -HUP mythlcdserver - find /var/log/mythtv/old -type f -mtime +30 -delete - endscript -} |