# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/vdr/vdr.conf # Copyright (C) 2007 - 2023 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2. # --- T2-COPYRIGHT-NOTE-END --- . $base/package/vdr/*/vdr-conf.in if [ "${VIDEODIR:0:1}" = "/" ]; then var_append flistroot ' ' "${VIDEODIR:1}" fi gen_runvdr() { cat << EOC > $root$bindir/stopvdr.sh #!/bin/sh VDRPRG="$bindir/vdr" logger "stopvdr: called with: \$@" if [ \$1 -ne 0 ]; then # Calculate start time acpitime=\$(date --date="\$((\$1 - \$(date "+%s"))) seconds" "+%Y-%d-%m %H:%M:%S") logger "stopvdr: restart at \$acpitime, recording channel \$4 (\$3)" echo \$acpitime > /proc/acpi/alarm #echo -n "mem" > /sys/power/state fi shutdown -h now exit 0; EOC chmod 0755 $root$bindir/stopvdr.sh cat << EOC > $root$bindir/runvdr.sh #!/bin/bash VDRPRG=$bindir/vdr VDRUSR= VDRPLUGINDB=$VDRPLUGINDB VDRPLUGINDIR=$VDRPLUGINDIR VDIR=$VIDEODIR KILL="killall -q -TERM \$VDRPRG" PLUGINS= while read P; do [ -r \$P ] && PLUGINS="\$PLUGINS@-P\`cat \$P\`" done < <(find \$VDRPLUGINDB -type l -name "vdr-*.active") VDRCMD="\$VDRPRG@-c@$sysconfdir@-s@$bindir/stopvdr.sh@-L@\$VDRPLUGINDIR@--no-kbd@--vfat@-w@300@-u@root@-v@\$VDIR@\$PLUGINS@\$*" OIFS="\$IFS" IFS=@ EOC if pkginstalled vdradmin; then cat << EOC >> $root$bindir/runvdr.sh #echo "Scheduling VDRAdmin" #su $VDRUSR -c $bindir/vdradmind.pl" | at now + 2 minutes EOC fi cat << EOC >> $root$bindir/runvdr.sh echo "VDRCMD=\$VDRCMD" echo "\$\$" > /var/run/runvdr.pid echo "Starting VDR" export HOME=\$VDIR export LC_ALL=de_DE #export LD_PRELOAD=/usr/lib/libavformat.so:/usr/lib/libavcodec.so # relict from old NPTL incompatible version, prior to 1.4.x #export LD_ASSUME_KERNEL=2.4.1 (cd \$VDIR; \$VDRCMD \$VDRUSR) EOC chmod 0755 $root$bindir/runvdr.sh } vdr_setup() { cat > Make.config <