From 88ebdf3fa10fcf7ad6891ed09b0a63f388efa4a2 Mon Sep 17 00:00:00 2001 From: Manuel Reimer Date: Fri, 26 Apr 2013 16:26:40 +0200 Subject: Added vdrpbd.conf template file and man page --- Makefile | 14 +++++++++++++- vdrpbd | 11 +++++++---- vdrpbd.conf | 8 ++++++++ vdrpbd.conf.pod | 36 ++++++++++++++++++++++++++++++++++++ 4 files changed, 64 insertions(+), 5 deletions(-) create mode 100644 vdrpbd.conf create mode 100644 vdrpbd.conf.pod diff --git a/Makefile b/Makefile index 4ed5628..5ca2d96 100644 --- a/Makefile +++ b/Makefile @@ -4,18 +4,28 @@ DESTDIR= PREFIX=/usr/local MANDIR=$(PREFIX)/share/man BINDIR=$(PREFIX)/sbin +CONFDIR=/etc SYSTEMDUNITDIR=$(shell pkg-config --variable systemdsystemunitdir systemd 2>/dev/null) VERSION=$(shell sed -rn 's/.*\$$VERSION = .(.+?).;$$/\1/p' vdrpbd) .PHONY: all install uninstall clean dist -all: vdrpbd.1 +all: vdrpbd.1 vdrpbd.conf.5 vdrpbd.1: vdrpbd; pod2man $< $@ +vdrpbd.conf.5: vdrpbd.conf.pod; pod2man $< $@ install: all mkdir -p $(DESTDIR)$(MANDIR)/man1 gzip -c vdrpbd.1 > $(DESTDIR)$(MANDIR)/man1/vdrpbd.1.gz + + mkdir -p $(DESTDIR)$(MANDIR)/man5 + gzip -c vdrpbd.conf.5 > $(DESTDIR)$(MANDIR)/man5/vdrpbd.conf.5.gz + + mkdir -p $(DESTDIR)$(CONFDIR) + cp -pn vdrpbd.conf $(DESTDIR)$(CONFDIR) + install -D -m 755 vdrpbd $(DESTDIR)$(BINDIR)/vdrpbd + ifneq ($(strip $(SYSTEMDUNITDIR)),) install -D -m 644 vdrpbd.service $(DESTDIR)$(SYSTEMDUNITDIR)/vdrpbd.service sed -i "s#/usr/sbin/vdrpbd#$(BINDIR)/vdrpbd#" $(DESTDIR)$(SYSTEMDUNITDIR)/vdrpbd.service @@ -24,12 +34,14 @@ endif uninstall: rm -f $(DESTDIR)$(BINDIR)/vdrpbd rm -f $(DESTDIR)$(MANDIR)/man1/vdrpbd.1.gz + rm -f $(DESTDIR)$(MANDIR)/man5/vdrpbd.conf.5.gz ifneq ($(strip $(SYSTEMDUNITDIR)),) rm -f $(DESTDIR)$(SYSTEMDUNITDIR)/vdrpbd.service endif clean: @rm -f vdrpbd.1 + @rm -f vdrpbd.conf.5 @rm -f vdrpbd-*.tar.xz dist: clean diff --git a/vdrpbd b/vdrpbd index 559940e..139e6ee 100755 --- a/vdrpbd +++ b/vdrpbd @@ -224,10 +224,7 @@ sub SendSVDRP { } } -# This one requires the "vdr-dbus-plugin" to be installed. -# I don't use it and I have not tested this one. I only added it to show -# my good will. I'll document this feature as soon as someone tested it and -# reported that it works the way it should. +# This one requires the "dbus2vdr-plugin" to be installed. sub SendDBus { eval { my $bus = Net::DBus->system(); @@ -296,3 +293,9 @@ display this help and exit =item B<--version> output version information and exit + +=back + +=head1 SEE ALSO + +vdrpbd.conf(5) diff --git a/vdrpbd.conf b/vdrpbd.conf new file mode 100644 index 0000000..87bacdf --- /dev/null +++ b/vdrpbd.conf @@ -0,0 +1,8 @@ +# Numer of keypresses and ... +#ER_COUNT=4 + +# ... time range in seconds to trigger emergency reboot +#ER_TIME=3 + +# Set this to 1 if you want to dbus2vdr plugin to send the power button event +#USE_DBUS=0 diff --git a/vdrpbd.conf.pod b/vdrpbd.conf.pod new file mode 100644 index 0000000..d6c5a1b --- /dev/null +++ b/vdrpbd.conf.pod @@ -0,0 +1,36 @@ +=head1 NAME + +vdrpbd.conf - Configuration file for vdrpbd + +=head1 SYNOPSIS + +B + +=head1 DESCRIPTION + +The file B is an optional configuration file to customize some settings of vdrpbd. + +=head1 VARIABLES + +The following variables can be set in vdrpbd.conf: + + ER_COUNT=4 + ER_TIME=3 + +=over 5 + +These two variables customize the key sequence that has to be pressed to trigger an emergency reboot. The variable "ER_TIME" sets the time range in seconds, in which you have to press the power button "ER_COUNT" times. + +=back + + USE_DBUS=0 + +=over 5 + +If you set this to 1, then the power button event is sent to VDR using "dbus" and not using SVDRP. This requires the dbus2vdr plugin to be loaded in VDR and the "Net::DBus" Perl module has to exist on your system. + +=back + +=head1 SEE ALSO + +vdrpbd(1) -- cgit v1.2.3