diff options
author | horchi <vdr@jwendel.de> | 2017-03-05 16:39:28 +0100 |
---|---|---|
committer | horchi <vdr@jwendel.de> | 2017-03-05 16:39:28 +0100 |
commit | e2a48d8701f91b8e24fbe9e99e91eb72a87bb749 (patch) | |
tree | 726f70554b4ca985a09ef6e30a7fdc8df089993c /contrib | |
download | vdr-epg-daemon-e2a48d8701f91b8e24fbe9e99e91eb72a87bb749.tar.gz vdr-epg-daemon-e2a48d8701f91b8e24fbe9e99e91eb72a87bb749.tar.bz2 |
git init1.1.103
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/40-epgd.conf | 2 | ||||
-rw-r--r-- | contrib/README.fedora | 122 | ||||
-rw-r--r-- | contrib/README.openrc | 9 | ||||
-rw-r--r-- | contrib/epgd.SuSE | 115 | ||||
-rw-r--r-- | contrib/epgd.conf | 19 | ||||
-rw-r--r-- | contrib/epgd.conf.d.openrc | 3 | ||||
-rw-r--r-- | contrib/epgd.debian | 68 | ||||
-rw-r--r-- | contrib/epgd.ignore | 48 | ||||
-rwxr-xr-x | contrib/epgd.init.d | 86 | ||||
-rwxr-xr-x | contrib/epgd.init.d.openrc | 30 | ||||
-rw-r--r-- | contrib/epgd.service | 13 | ||||
-rw-r--r-- | contrib/epghttpd.conf | 17 | ||||
-rwxr-xr-x | contrib/epghttpd.init.d | 73 | ||||
-rw-r--r-- | contrib/epghttpd.service | 13 | ||||
-rw-r--r-- | contrib/gentoo/README.txt | 108 | ||||
-rw-r--r-- | contrib/gentoo/epgd-ebuild.tgz | bin | 0 -> 2732 bytes |
16 files changed, 726 insertions, 0 deletions
diff --git a/contrib/40-epgd.conf b/contrib/40-epgd.conf new file mode 100644 index 0000000..1179acf --- /dev/null +++ b/contrib/40-epgd.conf @@ -0,0 +1,2 @@ +local2.* -/var/log/epgd.log +local2.* ~ diff --git a/contrib/README.fedora b/contrib/README.fedora new file mode 100644 index 0000000..5b62123 --- /dev/null +++ b/contrib/README.fedora @@ -0,0 +1,122 @@ +Installation instructions for Fedora 23 and above +------------------------------------------------- + +Installation of mysql database +------------------------------ + +[root@fc23 tmp]# dnf -y install mariadb mariadb-libs mariadb-server + +- enable mysql service + +[root@fc23 tmp]# systemctl enable mariadb.service + +- start mysql service + +[root@fc23 tmp]# systemctl start mariadb.service + +- check mysql status + +[root@fc23 tmp]# systemctl status mariadb.service +? mariadb.service - MariaDB 10.1 database server + Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled) + Active: active (running) since Mi 2016-04-06 08:35:23 CEST; 3s ago + Process: 55587 ExecStartPost=/usr/libexec/mysql-check-upgrade (code=exited, status=0/SUCCESS) + Process: 55403 ExecStartPre=/usr/libexec/mysql-prepare-db-dir %n (code=exited, status=0/SUCCESS) + Process: 55375 ExecStartPre=/usr/libexec/mysql-check-socket (code=exited, status=0/SUCCESS) + Main PID: 55557 (mysqld) + Status: "Taking your SQL requests now..." + Tasks: 25 (limit: 512) + CGroup: /system.slice/mariadb.service + +-55557 /usr/libexec/mysqld --basedir=/usr + +Apr 06 08:35:09 fc24 mysql-prepare-db-dir[55403]: 2016-04-06 8:35:09 139857994893504 [Note] /usr/libexec/mysqld (mysqld 10.1.12-MariaDB) start +Apr 06 08:35:18 fc24 mysql-prepare-db-dir[55403]: 2016-04-06 8:35:18 139836914665664 [Note] /usr/libexec/mysqld (mysqld 10.1.12-MariaDB) start +Apr 06 08:35:20 fc24 mysql-prepare-db-dir[55403]: 2016-04-06 8:35:20 139732787038400 [Note] /usr/libexec/mysqld (mysqld 10.1.12-MariaDB) start +Apr 06 08:35:23 fc24 mysql-prepare-db-dir[55403]: PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER ! +Apr 06 08:35:23 fc24 mysql-prepare-db-dir[55403]: To do so, start the server, then issue the following commands: +Apr 06 08:35:23 fc24 mysql-prepare-db-dir[55403]: '/usr/bin/mysqladmin' -u root password 'new-password' +Apr 06 08:35:23 fc24 mysql-prepare-db-dir[55403]: '/usr/bin/mysqladmin' -u root -h fc24 password 'new-password' +Apr 06 08:35:23 fc24 mysql-prepare-db-dir[55403]: Alternatively you can run: +Apr 06 08:35:23 fc24 mysqld[55557]: 2016-04-06 8:35:23 140367759493312 [Note] /usr/libexec/mysqld (mysqld 10.1.12-MariaDB) starting as process +Apr 06 08:35:23 fc24 systemd[1]: Started MariaDB 10.1 database server. + +- install the necessary vdr plugins for a working epg environment + +[root@fc23 tmp]# dnf install vdr-scraper2vdr vdr-epg2vdr vdr-epg-daemon + +- create mysql root password for epgd-tool and save it in the root folder + +[root@fc23 tmp]# mysqladmin -u root -p password "password" +[root@fc23 tmp]# mkdir -p ~/.ssh +[root@fc23 tmp]# echo 'export PASSWORD="password"' > ~/.ssh/mysqlpasswd + +- create new mysql database and user with the helper script epgd-tool + +[root@fc23 tmp]# epgd-tool -fix-cnf +[root@fc23 tmp]# epgd-tool -new-db +[root@fc23 tmp]# epgd-tool -new-u + +- customize the channelmap.conf + +modify the config files (/etc/epgd/channelmap.conf and /etc/epgd/epgd.conf) like your needs or take a prepared one from +http://www.vdr-portal.de/index.php?page=Attachment&attachmentID=35919&h=2f0cb1b9698645550cd789acf335c3bb99cc7051&s=2d0ac4c6400452abd71b1e36cd9c51f5b4811f7f + +- enable the epgd service + +[root@fc23 tmp]# systemctl enable epgd.service + +- start the epgd service + +[root@fc23 tmp]# systemctl start epgd.service + +- check the epgd status + +[root@fc23 tmp]# systemctl status epgd.service +epgd.service - Database driven EPG Data collector + Loaded: loaded (/usr/lib/systemd/system/epgd.service; enabled) + Active: active (running) since Do 2016-04-01 14:51:08 CEST; 7s ago + Process: 18714 ExecStart=/usr/bin/epgd -c /etc/epgd (code=exited, status=0/SUCCESS) + Main PID: 18719 (epgd) + CGroup: /system.slice/epgd.service + └─18719 /usr/bin/epgd -c /etc/epgd +Apr 01 14:51:07 fc23 epgd[18714]: Loading '/etc/epgd/channelmap.conf' +Apr 01 14:51:07 fc23 epgd[18714]: 26 channel mappings read. +Apr 01 14:51:07 fc23 epgd[18714]: Creating directory '/var/cache/epgd/epgdata' +Apr 01 14:51:07 fc23 epgd[18714]: No external events on database, force initial check! +Apr 01 14:51:07 fc23 epgd[18714]: using scrapping language de +Apr 01 14:51:07 fc23 epgd[18714]: tvdb scraper connected +Apr 01 14:51:08 fc23 epgd[18714]: moviedb scraper connected +Apr 01 14:51:08 fc23 epgd[18719]: Scheduled next update in 10 second(s) +Apr 01 14:51:08 fc23 epgd[18719]: State now 'standby' +Apr 01 14:51:08 fc23 systemd[1]: Started Database driven EPG Data collector. + +- enable the epghttpd service + +[root@fc23 tmp]# systemctl enable epghttpd.service + +- start the epghttpd service + +[root@fc23 tmp]# systemctl start epghttpd.service + +- check the epghttpd status + +[root@fc23 tmp]# systemctl status epghttpd.service +● epghttpd.service - EPG HTTP Daemon that provides a web interface + Loaded: loaded (/usr/lib/systemd/system/epghttpd.service; enabled; vendor preset: disabled) + Active: active (running) since Di 2016-04-26 19:55:49 CEST; 1h 33min ago + Main PID: 3252 (epghttpd) + CGroup: /system.slice/epghttpd.service + └─3252 /usr/bin/epghttpd -c /etc/epgd + +Apr 26 19:55:49 fc23 epghttpd[3252]: Initialize python script '/etc/epgd/recording.py' +Apr 26 19:55:49 fc23 epghttpd[3252]: Dictionary '/etc/epgd/epg.dat' loaded +Apr 26 19:55:49 fc23 epghttpd[3252]: Info: Calling mysql_library_init() +Apr 26 19:55:49 fc23 epghttpd[3252]: Connecting to database at 'localhost:3306' +Apr 26 19:55:49 fc23 epghttpd[3252]: Calling mysql_init(3252) +Apr 26 19:55:49 fc23 epghttpd[3252]: SQL client character now 'utf8' +Apr 26 19:55:49 fc23 epghttpd[3252]: Calling mysql_init(3252) +Apr 26 19:55:49 fc23 epghttpd[3252]: Listener at port 9999 established, waiting for connections +Apr 26 19:55:49 fc23 epghttpd[3252]: Info: Systemd support not enabled, epgd won't be sending notifications! +Apr 26 21:29:05 fc23 systemd[1]: Started EPG HTTP Daemon that provides a web interface. + +For more information, please read the document /usr/share/doc/vdr-epg-daemon/README. diff --git a/contrib/README.openrc b/contrib/README.openrc new file mode 100644 index 0000000..cdc6b3d --- /dev/null +++ b/contrib/README.openrc @@ -0,0 +1,9 @@ +To use the openrc init-scripts (i.e. on gentoo linux): + +cp ./contrib/epgd.init.d.openrc /etc/init.d/epgd +chmod 0744 /etc/init.d/epgd + +cp ./contrib/epgd.conf.d.openrc /etc/conf.d/epgd +chmod 0644 /etc/conf.d/epgd + +Edit /etc/conf.d/epgd to your preferences. epgd config is in /etc/epgd/epgd.conf (see README in source-root) diff --git a/contrib/epgd.SuSE b/contrib/epgd.SuSE new file mode 100644 index 0000000..6947963 --- /dev/null +++ b/contrib/epgd.SuSE @@ -0,0 +1,115 @@ +#! /bin/bash +# +# Author: +# +# /etc/init.d/epg +# +### BEGIN INIT INFO +# Provides: epgd +# Required-Start: $syslog mysql +# Required-Stop: +# Default-Start: 2 3 5 +# Default-Stop: 0 1 2 6 +# Short-Description: EPG Daemon +# Description: EPG Daemon - collects EPG Data from VDR's +# and other ressources +### END INIT INFO + +# Check for missing binaries (stale symlinks should not happen) +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 + +# Source LSB init functions +# providing start_daemon, killproc, pidofproc, +# log_success_msg, log_failure_msg and log_warning_msg. +# This is currently not used by UnitedLinux based distributions and +# not needed for init scripts for UnitedLinux only. If it is used, +# the functions from rc.status should not be sourced or used. +#. /lib/lsb/init-functions + +# Shell functions sourced from /etc/rc.status: +# rc_check check and set local and overall rc status +# rc_status check and set local and overall rc status +# rc_status -v ditto but be verbose in local rc status +# rc_status -v -r ditto and clear the local rc status + +# rc_status -s display "skipped" and exit with status 3 +# rc_status -u display "unused" and exit with status 3 +# rc_failed set local and overall rc status to failed +# rc_failed <num> set local and overall rc status to <num> +# rc_reset clear local rc status (overall remains) +# rc_exit exit appropriate to overall rc status +# rc_active checks whether a service is activated by symlinks +# rc_splash arg sets the boot splash screen to arg (if active) +. /etc/rc.status + +# Reset status of this service +rc_reset + +# Return values acc. to LSB for all commands but status: +# 0 - success +# 1 - generic or unspecified error +# 2 - invalid or excess argument(s) +# 3 - unimplemented feature (e.g. "reload") +# 4 - user had insufficient privileges +# 5 - program is not installed +# 6 - program is not configured +# 7 - program is not running +# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl) +# +# Note that starting an already running service, stopping +# or restarting a not-running service as well as the restart +# with force-reload (in case signaling is not supported) are +# considered a success. + +start_epgd() { + echo -n "Starting EPG-Daemon" + startproc ${EPGD_BIN} -n -c ${EPGD_CONFDIR} -p ${EPGD_PLGDIR} + sleep 2 && checkproc $EPGD_BIN + # Remember status and be verbose + rc_status -v +} + +stop_epgd() +{ + echo -n "Stopping EPG-Daemon" + ## Stop daemon with killproc(8) and if this fails + ## killproc sets the return value according to LSB. + + /sbin/killproc -TERM ${EPGD_BIN} + + # Remember status and be verbose + rc_status -v +} + +case "$1" in + start) + start_epgd + ;; + stop) + stop_epgd + ;; + restart) + stop_epgd + sleep2 + start_epgd + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac +rc_exit diff --git a/contrib/epgd.conf b/contrib/epgd.conf new file mode 100644 index 0000000..c1f6b07 --- /dev/null +++ b/contrib/epgd.conf @@ -0,0 +1,19 @@ +# epgd - EPG Daemon +# +# The EPG daemon provides EPG data from various providers +# +# upstart script + +description "EPG Daemon" +author "Jörg Wendel <vdr at jwendel dot de>" + +start on (started local-filesystems and net-device-up IFACE!=lo) +stop on runlevel [!2345] + +script + +export LANG="de_DE.UTF-8" + +exec <BINDEST>/epgd -n -p <PLGDEST> + +end script diff --git a/contrib/epgd.conf.d.openrc b/contrib/epgd.conf.d.openrc new file mode 100644 index 0000000..e720b94 --- /dev/null +++ b/contrib/epgd.conf.d.openrc @@ -0,0 +1,3 @@ +LOGFILE="/var/log/epgd.log" +PIDFILE="/var/run/epgd.pid" +CLI_OPTIONS="-n -p /usr/local/lib/epgd/plugins" diff --git a/contrib/epgd.debian b/contrib/epgd.debian new file mode 100644 index 0000000..0b4256d --- /dev/null +++ b/contrib/epgd.debian @@ -0,0 +1,68 @@ +#! /bin/bash +# +# Author: +# +# /etc/init.d/epg +# +### BEGIN INIT INFO +# Provides: epgd +# Required-Start: $syslog mysql +# Required-Stop: +# Default-Start: 2 3 5 +# Default-Stop: 0 1 2 6 +# Short-Description: EPG Daemon +# Description: EPG Daemon - collects EPG Data from VDR's +# and other ressources +### END INIT INFO + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +NAME=EPGD +DESC="EPG Daemon" + +# Check for missing binaries (stale symlinks should not happen) +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 diff --git a/contrib/epgd.ignore b/contrib/epgd.ignore new file mode 100644 index 0000000..dbd7b83 --- /dev/null +++ b/contrib/epgd.ignore @@ -0,0 +1,48 @@ +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: .*channel mappings read. +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Cleanup of events finished +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Cleanup of events finished +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Delete events +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Delete fileref.*source.*and starttime.*duration +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Download header for day +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Downloaded file.*with.*Bytes +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Downloaded image +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: EPG Update finished, loaded.*files.*non-updates skipped, 0 rejected due to format error. +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: EPG Update started +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Got \'Setting encoding to utf8\' +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Got info for day.*file.*with tag +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Got.*Setting encoding to utf8 +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Image cleanup finished +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Info: Stylesheet +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Loaded.*images.*, checked +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Loading +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Lookup done for.*series, matched.*parts by compare and.*parts by lv in.*seconds +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Processing file.*for day +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Read.*option from /etc/epgd/epgd.conf +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Received.*episode files +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Requesting episode changes of last.*minutes +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: SQL client character now +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: SVDRPCL: connected to eplists.constabel.net +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Scheduled next update in +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Set locale to +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Shutdown triggered with signal 15 +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Skipping download of day.*due to non-update +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Skipping update check of file.*for day +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Start download of new images +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Starting cleanup of events +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Starting cleanup of image +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Starting episode download +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Starting episode lookup +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Statement.*insert|select +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Statement.*update|delete +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Still updating images, now.*checked and.*loaded +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: There are.*images for event +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Updating day today.*now +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Updating day today.*now +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: Updating.*day today.*now +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: View.*eventsview.*already exist +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: XML File.*processed, updated.*events +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: action ended +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: detected UTF-8 +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: no images for event +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: shutdown +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ epgd: try loading image from diff --git a/contrib/epgd.init.d b/contrib/epgd.init.d new file mode 100755 index 0000000..3494fe1 --- /dev/null +++ b/contrib/epgd.init.d @@ -0,0 +1,86 @@ +#! /bin/bash +# +# Author: OleS +# +# /etc/init.d/epgd +# +### BEGIN INIT INFO +# Provides: epgd +# Required-Start: $syslog mysql +# Required-Stop: +# Default-Start: 2 3 5 +# Default-Stop: 0 1 2 6 +# Short-Description: EPG Daemon +# Description: EPG Daemon - collects EPG Data from VDR's +# and other ressources +### END INIT INFO + +export LANG="de_DE.UTF-8" +export LC_ALL="de_DE.UTF-8" +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +NAME=epgd +DESC="EPG Daemon" + +# Check for missing binaries (stale symlinks should not happen) +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 existance of needed plugin directory +EPGD_PLGDIR=/usr/local/lib/epgd/plugins +test -d $EPGD_PLGDIR || exit 6 + +. /lib/lsb/init-functions + +start_epgd() { + log_daemon_msg "Starting $DESC" "$NAME" || true + if start-stop-daemon --start --quiet --background --oknodo --exec ${EPGD_BIN} -- -n -c ${EPGD_CONFDIR} -p ${EPGD_PLGDIR}; then + log_end_msg 0 || true + else + log_end_msg 1 || true + fi +} + +stop_epgd() +{ + log_daemon_msg "Stopping $DESC" "$NAME" || true + if start-stop-daemon --stop --signal KILL --verbose --oknodo --exec ${EPGD_BIN} 2>&1> /dev/null; then + log_end_msg 0 || true + else + log_end_msg 1 || true + fi +} + +status_epgd() +{ + status_of_proc /usr/local/bin/epgd $NAME && exit 0 || exit $? +} + +case "$1" in + start) + start_epgd + ;; + stop) + stop_epgd + ;; + restart) + stop_epgd + sleep 2 + start_epgd + ;; + status) + status_epgd + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart|status}" >&2 + exit 1 + ;; +esac diff --git a/contrib/epgd.init.d.openrc b/contrib/epgd.init.d.openrc new file mode 100755 index 0000000..d45c511 --- /dev/null +++ b/contrib/epgd.init.d.openrc @@ -0,0 +1,30 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +depend() { + need net + need mysql +} + +start() { + export LOGFILE + export LANG="de_DE.UTF-8" + export PIDFILE + export CLI_OPTIONS + export COMMAND="/usr/local/bin/epgd" + ebegin "Starting epgd" + start-stop-daemon --start --pidfile ${PIDFILE} -i -u root:root \ + --progress --background --make-pidfile -1 ${LOGFILE} \ + -2 ${LOGFILE} --exec ${COMMAND} --verbose -- ${CLI_OPTIONS} + eend $? +} + +stop() { + ebegin "Stoping epgd" + start-stop-daemon --stop --pidfile ${PIDFILE} --progress \ + --retry 30 --exec ${COMMAND} --verbose + + eend $? +} diff --git a/contrib/epgd.service b/contrib/epgd.service new file mode 100644 index 0000000..d7af532 --- /dev/null +++ b/contrib/epgd.service @@ -0,0 +1,13 @@ +[Unit] + +Description = Database driven EPG Data collector +After = <AFTER> + +[Service] + +Type = forking +ExecStart = <BINDEST>/epgd -c /etc/epgd -p <PLGDEST> + +[Install] + +WantedBy = multi-user.target diff --git a/contrib/epghttpd.conf b/contrib/epghttpd.conf new file mode 100644 index 0000000..90d1a24 --- /dev/null +++ b/contrib/epghttpd.conf @@ -0,0 +1,17 @@ +# EPG web/http Deamon +# +# upstart script + + +description "EPG/Web-Server" + +start on (started epgd) +stop on runlevel [!2345] + +script + +export LANG="de_DE.UTF-8" + +exec <BINDEST>/epghttpd -n + +end script diff --git a/contrib/epghttpd.init.d b/contrib/epghttpd.init.d new file mode 100755 index 0000000..310bd01 --- /dev/null +++ b/contrib/epghttpd.init.d @@ -0,0 +1,73 @@ +#! /bin/bash +# +# Author: OleS +# +# /etc/init.d/epghttpd +# +### BEGIN INIT INFO +# Provides: epghttpd +# Required-Start: $syslog epgd +# Required-Stop: +# Default-Start: 2 3 5 +# Default-Stop: 0 1 2 6 +# Short-Description: EPG HTTP Daemon +# Description: EPG HTTP Daemon - provides a web interface similar to vdr live +### END INIT INFO + +export LANG="de_DE.UTF-8" +export LC_ALL="de_DE.UTF-8" +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +NAME=epghttpd +DESC="EPG HTTP Daemon" + +# Check for missing binaries (stale symlinks should not happen) +EPGHTTPD_BIN=/usr/local/bin/epghttpd +test -x $EPGHTTPD_BIN || exit 5 + +. /lib/lsb/init-functions + +start_epghttpd() { + log_daemon_msg "Starting $DESC" "$NAME" || true + if start-stop-daemon --start --quiet --background --oknodo --exec ${EPGHTTPD_BIN} -- -n; then + log_end_msg 0 || true + else + log_end_msg 1 || true + fi +} + +stop_epghttpd() +{ + log_daemon_msg "Stopping $DESC" "$NAME" || true + if start-stop-daemon --stop --signal KILL --verbose --oknodo --exec ${EPGHTTPD_BIN} 2>&1> /dev/null; then + log_end_msg 0 || true + else + log_end_msg 1 || true + fi +} + +status_epghttpd() +{ + status_of_proc /usr/local/bin/epghttpd $NAME && exit 0 || exit $? +} + +case "$1" in + start) + start_epghttpd + ;; + stop) + stop_epghttpd + ;; + restart) + stop_epghttpd + sleep 2 + start_epghttpd + ;; + status) + status_epghttpd + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart|status}" >&2 + exit 1 + ;; +esac diff --git a/contrib/epghttpd.service b/contrib/epghttpd.service new file mode 100644 index 0000000..fd8d7f4 --- /dev/null +++ b/contrib/epghttpd.service @@ -0,0 +1,13 @@ +[Unit] + +Description = EPG HTTP Daemon that provides a web interface +After = epgd.service + +[Service] + +Type = forking +ExecStart = <BINDEST>/epghttpd -c /etc/epgd + +[Install] + +WantedBy = multi-user.target diff --git a/contrib/gentoo/README.txt b/contrib/gentoo/README.txt new file mode 100644 index 0000000..0bdf32c --- /dev/null +++ b/contrib/gentoo/README.txt @@ -0,0 +1,108 @@ +Installation des EPG Deamon und des epg2vdr Plugins auf Gen2VDR (ab Version 4) +by 3PO + +ebuild herunterladen: + + +cd /tmp +git clone git://projects.vdr-developer.org/vdr-epg-daemon.git + +Dann der "/etc/portage/make.conf" folgenden Eintrag hinzuf?gen: + +EPGD_LOCAL_PATCHES_DIR="/usr/local/portage/patches/epgd" + + + +Das ebuild entpacken und EPGd installieren: + +cd /tmp/vdr-epg-daemon/contrib/gentoo +tar -xvf epgd-ebuild.tgz -C / +echo "=media-tv/epgd-9999 **" >> /etc/portage/package.keywords/media +emerge -av epgd + + + +Sollen weitere Plugins verwendet werden, dann geht das z.B. so: + +mkdir -p /usr/local/portage/patches/epgd +cd /usr/local/portage/patches/epgd +wget http://dreipo.cc/tvm/tvm.diff +emerge -av epgd + + + + +Die MySQL Datenbank wird wie folgt erstellt: + +MySQL starten und dem Autostart hinzuf?gen: + +stt mysql +rc-update add mysql default + + + +Falls noch nicht geschehen, das root Passwort f?r MySQL vergeben: + +mysqladmin -u root -p password "WUNSCHPASSWORT" + + + +Man kann es dann, der Einfachheit halber, im root Verzeichnis speichern: + +mkdir -p /root/.ssh +echo 'export PASSWORD="WUNSCHPASSWORT"' > /root/.ssh/mysqlpasswd + + + +Datenbank erstellen lassen: + +epgd-tool -new + + + +EPGd starten und dem Autostart hinzuf?gen: + +rc-update add epgd default + + + +Damit ist der Serverteil erledigt, jetzt muss noch das epg2vdr Plugin installiert werden: + +cd /usr/local/src/VDR/PLUGINS/src +git clone git://projects.vdr-developer.org/vdr-plugin-epg2vdr.git epg2vdr-git +ln -svfn epg2vdr-git epg2vdr +cd epg2vdr +make all +make install +/_config/bin/instvdr.sh + + + + +Jetzt noch mit: + +g2v-setup + +epg2vdr aktivieren. + + +FERTIG! ;) + + + +Updates: + +EPGd: + +emerge -av epgd +stp epgd && stt epgd + + + + +epg2vdr Plugin: + +cd /usr/local/src/VDR/PLUGINS/src/epg2vdr +git pull +make clean all install +/_config/bin/instvdr.sh diff --git a/contrib/gentoo/epgd-ebuild.tgz b/contrib/gentoo/epgd-ebuild.tgz Binary files differnew file mode 100644 index 0000000..f95853c --- /dev/null +++ b/contrib/gentoo/epgd-ebuild.tgz |