# Verzeichnis für die Aufnahmen anlegen mkdir -p /mnt/sda1/video0 chown -R vdr:vdr /mnt/sda1/video0/ chmod g+w /mnt/sda1/video0/ # VDR Konfigurationsdateien (nach-) bearbeiten: sed -i 's/ENABLED="0"/ENABLED="1"/g' /etc/default/vdradmin-am sed -i 's/UpdateChannels = 5/UpdateChannels = 0/g' /var/lib/vdr/setup.conf sed -i 's/--video=\/var\/lib\/video/--video=\/mnt\/sda1\/video0/g' /etc/vdr/conf.d/00-vdr.conf sed -i 's/--lirc/#--lirc/g' /etc/vdr/conf.d/00-vdr.conf sed -i 's/--vfat/#--vfat/g' /etc/vdr/conf.d/00-vdr.conf # Aktionen im Anschluss einer Aufnahme: Zugriffsrechte ändern: cp /etc/vdr/recording-hooks/R90.custom /etc/vdr/recording-hooks/R90.custom_orig sed -i '/ENDED/a \ \ \ \ \ \ \ \ chmod -R g+w $2/..' /etc/vdr/recording-hooks/R90.custom # Konfiguration von VDRAdmin-AM anpassen: sed -i 's/PASSWORD = linvdr/PASSWORD = vdr/g' /var/lib/vdradmin-am/vdradmind.conf sed -i 's/USERNAME = linvdr/USERNAME = vdr/g' /var/lib/vdradmin-am/vdradmind.conf if [[ -z `grep -w "LANG" /var/lib/vdradmin-am/vdradmind.conf` ]]; then echo "LANG = de_DE.utf8" >> /var/lib/vdradmin-am/vdradmind.conf else sed -i 's/LANG = en_US.utf8/LANG = de_DE.utf8/g' /var/lib/vdradmin-am/vdradmind.conf sed -i 's/LANG = /LANG = de_DE.utf8/g' /var/lib/vdradmin-am/vdradmind.conf fi sed -i 's/SERVERHOST = ::/SERVERHOST = 0.0.0.0/g' /var/lib/vdradmin-am/vdradmind.conf if [[ -z `grep -w "LOCAL_NET" /var/lib/vdradmin-am/vdradmind.conf` ]]; then echo "LOCAL_NET = 192.168.0.0/16" >> /var/lib/vdradmin-am/vdradmind.conf else sed -i 's/LOCAL_NET = 0.0.0.0\/32/LOCAL_NET = 192.168.0.0\/16/g' /var/lib/vdradmin-am/vdradmind.conf fi echo "VIDEODIR = /mnt/sda1/video0" >> /var/lib/vdradmin-am/vdradmind.conf echo "TM_MARGIN_BEGIN = 10" >> /var/lib/vdradmin-am/vdradmind.conf sed -i 's/GUEST_ACCOUNT = 0/GUEST_ACCOUNT = 1/g' /var/lib/vdradmin-am/vdradmind.conf echo "PASSWORD_GUEST = gast" >> /var/lib/vdradmin-am/vdradmind.conf echo "USERNAME_GUEST = gast" >> /var/lib/vdradmin-am/vdradmind.conf # Lokale Netzwerke zulassen: echo "192.168.0.0/16" >> /etc/vdr/svdrphosts.conf sed -i 's/#192.168.100.0\/24/192.168.0.0\/16/g' /etc/vdr/plugins/streamdevhosts.conf sed -i 's/192.168.0.0\/24/192.168.0.0\/16/g' /etc/vdr/plugins/vnsiserver/allowed_hosts.conf