Hi,
i am answering the question by myself for those who are looking for a solution too. There might be a better solution for this problem, but it works for me
Feel free to propose better approaches!
I put an empty file "ismounted" on my usb drive, which I will check in a shell script on router startup, if it exists. When the file exists the minidlna service gets reloaded
#!/bin/bash
while : ; do
[[ -f "/path/to/usbdrive/ismounted" ]] && break
sleep 1
done
/etc/init.d/minidlna reload
Let's assume the script name is "startdlna". Move it to "/etc/init.d/". To run the script during startup you have to put a symbolic link to "/etc/rc.d/". I think these scripts are executed in alphabetical order. So I named the link "S99startdlna".
Create the symbolic link as follows:
ln -s /etc/init.d/startdlna /etc/rc.d/S99startdlna
cheers!