systemctl stop vdr.service cp channels.conf channels.conf.backup rc=$?; if [[ $rc != 0 ]]; then echo "Error while copying channels.conf.backup!" ; exit $rc; fi echo "channels.conf copied to channels.conf.backup" sudo w_scan -fs -sS19E2 >channels.conf.scan rc=$?; if [[ $rc != 0 ]]; then echo "Error while scanning channels!" ; exit $rc; fi python3 updateChannels.py channels.conf.backup channels.conf.scan > channels.conf rc=$?; if [[ $rc != 0 ]]; then echo "Error while updating channels.conf!" ; exit $rc; fi echo "Do not forget to check if new channels are ok!" echo "If not, restore from channels.conf.backup" systemctl start vdr.service