#! /bin/bash # # Run via cron every 5 minutes # cfg=/etc/musiikki.conf if [ ! -f ${cfg} ] then echo "Cannot find config file ${cfg}" > /dev/stderr exit 2 fi . $cfg # # Unfortunately minidlnad is not able to rescan the archive during # regular operation. Depending on the size of the archive rescanning # can last for one hour or more, and only few files will be announced # during this operation. # if [ -f "${rescan_file}" ] then trap "rm -f ${rescan_file}" INT EXIT QUIT if [ "${rescan_file}" -nt "${cache}" ] then /usr/sbin/minidlnad -R /usr/sbin/service minidlna restart fi fi