Ubuntu HD VDR mittels SoftHDDevice und VDPAU/EPG-Daemon

Aus VDR Wiki
Version vom 9. Mai 2016, 18:20 Uhr von Hulk (Diskussion | Beiträge)

(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Wechseln zu: Navigation, Suche

Inhaltsverzeichnis

EPG Daemon

Infos zu EPG Daemon

VDR EPG Daemon

Download EPG Daemon

cd /data/installfiles/vdrplugins
git clone git://projects.vdr-developer.org/vdr-epg-daemon.git
tar -czf vdr-epg-daemon-git-02022015.tar.gz vdr-epg-daemon/

Was hat sich geändert?

http://projects.vdr-developer.org/projects/vdr-epg-daemon/repository

Installation MySQL EPG Daemon Plugin

cd /usr/local/src
sudo cp -a /data/installfiles/vdrplugins/vdr-epg-daemon .
sudo ln -s vdr-epg-daemon/ epgd
cd /usr/local/src/epgd
sudo make && sudo make install
mysql -u root -p

mysql>
DROP FUNCTION IF EXISTS epglv;
DROP FUNCTION IF EXISTS epglvr;
CREATE FUNCTION epglv RETURNS INT SONAME 'mysqlepglv.so';
CREATE FUNCTION epglvr RETURNS INT SONAME 'mysqlepglv.so';
SELECT * FROM mysql.func;

+--------+-----+---------------+----------+
| name   | ret | dl            | type     |
+--------+-----+---------------+----------+
| epglv  |   2 | mysqlepglv.so | function |
| epglvr |   2 | mysqlepglv.so | function |
+--------+-----+---------------+----------+
2 rows in set (0,00 sec)

exit

Datenbank und Benutzer anlegen

mysql -u root -p

mysql>
CREATE DATABASE epg2vdr charset utf8;
CREATE USER 'epg2vdr'@'%' IDENTIFIED BY 'epg';
GRANT ALL PRIVILEGES ON epg2vdr.* TO 'epg2vdr'@'%';

exit

Datenbank Benutzer überprüfen

mysql -u epg2vdr -pepg -Depg2vdr -h localhost

Die Ausgabe sollte in etwas so aussehen:

Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 47
Server version: 5.6.19-0ubuntu0.14.04.1 (Ubuntu)

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

exit

MySQL Konfiguration

Damit später auch remote verschiedene Clients auf die MySQL Datenbank zugreifen können muss dies konfiguriert werden.

sudo cp /etc/mysql/my.cnf /etc/mysql/my.cnf_orig
sudo vi /etc/mysql/my.cnf

Ändern von:

# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address            = 127.0.0.1

Abändern in:

# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address            = 192.168.0.10

Neustart MySQL

sudo /etc/init.d/mysql restart

Installation EPG Daemon

cd /usr/local/src/epgd/
sudo make && sudo make plugins && sudo make install && sudo make install-plugins

Konfiguration EPG Daemon

sudo cp /etc/epgd/channelmap.conf /etc/epgd/channelmap.conf_orig
sudo cp /etc/epgd/channelmap.conf-epgdata-astra /etc/epgd/channelmap.conf

sudo cp /etc/epgd/epgd.conf /etc/epgd/epgd.conf_orig
sudo vi /etc/epgd/epgd.conf
DaysInAdvance = 14

EPG Daemon mittels Upstart in den Autostart

epgd.conf erstellen

sudo vi /etc/init/epgd.conf
start on (started mysql and local-filesystems and net-device-up IFACE!=lo)
stop on runlevel [!2345]

script

export LANG="de_DE.UTF-8"
ulimit -c unlimited
exec /usr/local/bin/epgd -n -p /usr/local/lib/epgd/plugins

end script

EPG Daemon Initskript erstellen

sudo vi /etc/init.d/epgd
#! /bin/bash
#
# VDR EPG Daemon initscript
#
# /etc/init.d/epgd
#
### BEGIN INIT INFO
# Provides:          epgd
# Required-Start:    $remote_fs $syslog $network mysql
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: epgd
# Description:       VDR EPG Daemon
### END INIT INFO

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
NAME=epgd
DESC="VDR EPG Daemon"

# Check for missing binaries
EPGD_BIN=/usr/local/bin/epgd
test -x $EPGD_BIN || exit 5

# Check for existence of needed config directory
EPGD_CONFDIR=/etc/epgd
test -d $EPGD_CONFDIR || exit 6

# Check for existence of needed config file and read it
EPGD_CONFIG=${EPGD_CONFDIR}/epgd.conf
test -r $EPGD_CONFIG || exit 6

# Check for existence of needed plugin directory
EPGD_PLGDIR=/usr/local/lib/epgd/plugins
test -d $EPGD_PLGDIR || exit 6

start_epgd() {
    echo -n "Starting $DESC: "
    start-stop-daemon --start --verbose --background --oknodo --exec ${EPGD_BIN} -- -n -c ${EPGD_CONFDIR} -p ${EPGD_PLGDIR}
    echo "$NAME."
}

stop_epgd()
{
    echo -n "Stoppig $DESC: "
    start-stop-daemon --stop --signal KILL --verbose --oknodo --exec ${EPGD_BIN}
    echo "$NAME."
}

case "$1" in
    start)
        start_epgd
        ;;
    stop)
        stop_epgd
        ;;
    restart)
        stop_epgd
        sleep 2
        start_epgd
        ;;
    *)
        N=/etc/init.d/$NAME
        echo "Usage: $N {start|stop|restart|force-reload}" >&2
        exit 1
        ;;
esac

Skript ausführbar machen

sudo chmod +x /etc/init.d/epgd

Skripte/Module mit Root-Rechten und ohne Passwortaufforderung ausführen

Damit der Benutzer vdruser die benötigten Skripte/Module mit Root-Rechten und ohne Passwortaufforderung ausführen kann muss dies mittels visudo konfiguriert werden. Achtung! Die Einträge müssen untereinander und am Ende der Datei eingefügt werden.

sudo visudo
vdruser ALL=(ALL) NOPASSWD: /usr/local/bin/epgd,/etc/init.d/epgd

EPG Daemon manuell starten

export LANG="de_DE.UTF-8"
ulimit -c unlimited
sudo /usr/local/bin/epgd -n -p /usr/local/lib/epgd/plugins -t

System neustart

sudo init 6

Prüfen ob EPG Daemon nach dem Systemneustart läuft

ps -ax |grep epgd
1390 ?        Ss     0:00 /usr/local/bin/epgd -n -p /usr/local/lib/epgd/plugins

Scraper2VDR Plugin

Infos zum Plugin

Scraper2VDR Plugin

Download

cd /data/installfiles/vdrplugins
git clone https://github.com/horchi/scraper2vdr
tar -czf scraper2vdr-git-19022015.tar.gz scraper2vdr/

Was hat sich geändert?

http://projects.vdr-developer.org/projects/plg-scraper2vdr/repository

Installation

cd /usr/local/src/vdr/PLUGINS/src
sudo cp -a /data/installfiles/vdrplugins/scraper2vdr .
cd /usr/local/src/vdr/
sudo make plugins && sudo make install
sudo chown -R vdruser.vdruser /var/lib/vdr /var/cache/vdr

runvdr anpassen

sudo vi /usr/local/bin/runvdr
-P'scraper2vdr -m client'

Linksammlung

  1. VDR EPG Daemon
  2. Scraper2VDR plugin