summaryrefslogtreecommitdiff
path: root/media-tv/mythtv/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /media-tv/mythtv/files
reinit the tree, so we can have metadata
Diffstat (limited to 'media-tv/mythtv/files')
-rw-r--r--media-tv/mythtv/files/bash_profile4
-rw-r--r--media-tv/mythtv/files/mythbackend.conf-r118
-rw-r--r--media-tv/mythtv/files/mythbackend.init-r272
-rw-r--r--media-tv/mythtv/files/mythbackend.service-2866
-rw-r--r--media-tv/mythtv/files/mythfrontend.conf12
-rw-r--r--media-tv/mythtv/files/mythfrontend.wrapper29
-rw-r--r--media-tv/mythtv/files/mythtv.logrotate.d-r414
-rw-r--r--media-tv/mythtv/files/xinitrc-r18
8 files changed, 223 insertions, 0 deletions
diff --git a/media-tv/mythtv/files/bash_profile b/media-tv/mythtv/files/bash_profile
new file mode 100644
index 000000000000..5de354bccae9
--- /dev/null
+++ b/media-tv/mythtv/files/bash_profile
@@ -0,0 +1,4 @@
+# .bash_profile
+case "`tty`" in
+ *tty8) startx; logout ;;
+esac
diff --git a/media-tv/mythtv/files/mythbackend.conf-r1 b/media-tv/mythtv/files/mythbackend.conf-r1
new file mode 100644
index 000000000000..f7709c439b10
--- /dev/null
+++ b/media-tv/mythtv/files/mythbackend.conf-r1
@@ -0,0 +1,18 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# 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-r2 b/media-tv/mythtv/files/mythbackend.init-r2
new file mode 100644
index 000000000000..dc063030d47c
--- /dev/null
+++ b/media-tv/mythtv/files/mythbackend.init-r2
@@ -0,0 +1,72 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="MythTV backend recording daemon"
+extra_started_commands="resched upnprebuild"
+description_resched="Forces the recording scheduler to update"
+description_upnprebuild="Rebuilds the UPnP media cache"
+
+MYTHBACKEND_OPTS=${MYTHBACKEND_OPTS:-"${MYTHBACKEND_OPTS}"}
+MYTHBACKEND_VERBOSE=${MYTHBACKEND_VERBOSE:-"general"}
+MYTHBACKEND_LOGGING=${MYTHBACKEND_LOGGING:-"files"}
+
+name="MythTV backend"
+command="/usr/bin/mythbackend"
+pidfile="/run/mythtv/mythbackend.pid"
+start_stop_daemon_args="--pidfile ${pidfile} --user mythtv:video"
+command_args="--daemon --pidfile ${pidfile} --verbose ${MYTHBACKEND_VERBOSE} ${MYTHBACKEND_OPTS}"
+
+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_pre() {
+ 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 --directory --owner mythtv:video --mode 0755 /var/log/mythtv
+ checkpath --directory --owner mythtv:video --mode 0775 /home/mythtv
+ checkpath --directory --owner mythtv:video --mode 0750 /run/mythtv
+}
+
+start() {
+ ebegin "Starting ${name}"
+ start-stop-daemon --start ${start_stop_daemon_args} --exec ${command} \
+ -- ${command_args} ${logging}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${name}"
+ start-stop-daemon --stop --retry 10 --progress --pidfile ${pidfile}
+ eend $?
+}
+
+resched() {
+ ebegin "Updating the recording scheduler"
+ ${command} --resched
+ eend $?
+}
+
+upnprebuild() {
+ ebegin "Rebuilding UPnP media cache"
+ ${command} --upnprebuild
+ eend $?
+}
diff --git a/media-tv/mythtv/files/mythbackend.service-28 b/media-tv/mythtv/files/mythbackend.service-28
new file mode 100644
index 000000000000..3ab4c9b19ded
--- /dev/null
+++ b/media-tv/mythtv/files/mythbackend.service-28
@@ -0,0 +1,66 @@
+# Do not edit this file, it will be replaced on update
+# If you need to make modifications to this unit file first make a copy in # /etc/systemd/system
+
+# This file is part of the packaging of MythTV #
+# MythTV is free software; view http://www.mythtv.org for more information.
+#
+# It is sometimes necessary to wait for a capture device to finish (hot)plug
+# initialization before the backend starts. If this is necessary,
+# create a Wants and After entry for all the capture devices that
+# one wishes to wait to be created before the backend starts using the systemd
+# device name mangling names (/dev/some/thing turns
+# into dev-some-thing.device). These normally should be udev persistent
+# filename rules to avoid confusion.
+# See the MythTV wiki for udev persistent filename # discussions found at:
+# http://www.mythtv.org/wiki/Device_Filenames_and_udev
+#
+# In order to insure that systemd will create a device unit for the
+# capture device, one must insure that udev will have the tag "systemd"
+# (i.e. add TAG+="systemd" to the udev rule).
+#
+# The MythTV package ships with a default udev rule file located in:
+# /lib/udev/rules.d/99-mythbackend.rules
+
+[Unit]
+Description=MythTV backend service
+After=network.target mysqld.service
+# Uncomment the following line if you will be using the mythweb plugin on the
+# same system as mythbackend.
+#Wants=httpd.service
+
+[Service]
+Type=notify
+
+Environment=MYTHCONFDIR=/etc/mythtv
+# Default setting assumes a system wide install. Otherwise it should be set to
+# the folder containing the .mythtv subfolder containing the config.xml file
+# Such as
+#Environment=HOME=/usr/share/mythtv
+# or
+Environment=HOME=/~/.mythtv
+
+# systemd changes execution from the calling user (possibly root) to this user
+# if you have permissions problems or obscure errors try logging in as mythtv
+# See notes below
+User=mythtv
+
+# Uncomment one of the following...
+# Use sysloging rather than separate logging:
+#ExecStart=/usr/bin/mythbackend --syslog local7
+
+# If Type=forking you must specify the --daemon and --pidfile options:
+#ExecStart=/usr/bin/mythbackend --daemon --logpath /var/log/mythtv --loglevel crit --pidfile /run/mythtv/mythbackend.pid
+#PIDFILE=/run/mythtv/mythbackend.pid
+
+# Systemd sends stdout to syslog, and mythbackend has console logging enabled without --daemon.
+# Send stdout to /dev/null so console logging doesn't go to syslog
+#StandardOutput=null
+# Default setting for Type=simple.
+#ExecStart=/usr/bin/mythbackend --logpath /var/log/mythtv --loglevel crit
+ExecStart=/usr/bin/mythbackend --loglevel notice
+
+# Whether systemd will continue over-watch and restart on any halt
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/media-tv/mythtv/files/mythfrontend.conf b/media-tv/mythtv/files/mythfrontend.conf
new file mode 100644
index 000000000000..5dad284705ab
--- /dev/null
+++ b/media-tv/mythtv/files/mythfrontend.conf
@@ -0,0 +1,12 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Should 'mythfrontend' really execute mythwelcome instead?
+# Default: false
+MYTHWELCOME=false
+
+# Options to pass to mythfrontend or mythwelcome based on the above setting
+# Note: If you have mythwelcome enabled, it does not pass arguments to
+# mythfrontend. You must configure this inside mythwelcome
+# Default: --syslog local7
+MYTHFRONTEND_OPTS="--syslog local7"
diff --git a/media-tv/mythtv/files/mythfrontend.wrapper b/media-tv/mythtv/files/mythfrontend.wrapper
new file mode 100644
index 000000000000..ce3608ec1f9a
--- /dev/null
+++ b/media-tv/mythtv/files/mythfrontend.wrapper
@@ -0,0 +1,29 @@
+#!/bin/sh
+# Based on Mythbuntu's script
+
+# Check if the frontend is already running,
+# if it is bring it to the foreground.
+# This is to prevent multiple frontends from running
+/usr/bin/pgrep mythfrontend.real 2>&1 > /dev/null && \
+ /usr/bin/wmctrl -a "MythTV Frontend" 2> /dev/null && \
+ exit 0
+
+# Check if you're part of the video group
+if [ -n "$(groups | grep -v video)" ]; then
+ echo "'$USER' is not part of the 'video' group." >&2
+ echo "For best results add '$USER' to the 'video' group." >&2
+fi
+
+if [ -e /etc/conf.d/mythfrontend ]; then
+ . /etc/conf.d/mythfrontend
+fi
+
+if [ "x${MYTHWELCOME}" = "xtrue" ]; then
+ exec /usr/bin/mythwelcome ${MYTHFRONTEND_OPTS} "$@"
+ RET=$?
+else
+ exec /usr/bin/mythfrontend.real ${MYTHFRONTEND_OPTS} "$@"
+ RET=$?
+fi
+
+exit ${RET}
diff --git a/media-tv/mythtv/files/mythtv.logrotate.d-r4 b/media-tv/mythtv/files/mythtv.logrotate.d-r4
new file mode 100644
index 000000000000..28e3ce62bfdb
--- /dev/null
+++ b/media-tv/mythtv/files/mythtv.logrotate.d-r4
@@ -0,0 +1,14 @@
+/var/log/mythtv/*.log {
+ weekly
+ rotate 8
+ missingok
+ ifempty
+ nocreate
+ nocompress
+ sharedscripts
+ olddir /var/log/mythtv/old
+ lastaction
+ killall -HUP mythlogserver
+ find /var/log/mythtv/old -type f -mtime +30 -delete
+ endscript
+}
diff --git a/media-tv/mythtv/files/xinitrc-r1 b/media-tv/mythtv/files/xinitrc-r1
new file mode 100644
index 000000000000..c366fe487a84
--- /dev/null
+++ b/media-tv/mythtv/files/xinitrc-r1
@@ -0,0 +1,8 @@
+# .xinitrc
+[ -x /usr/bin/nvidia-settings ] && /usr/bin/nvidia-settings -l
+/usr/bin/xset s noblank
+/usr/bin/xset s off
+/usr/bin/xset -dpms
+/usr/bin/evilwm &
+# Configure arguments via /etc/conf.d/mythfrontend
+exec /usr/bin/mythfrontend