auto-rescan after disable inotify

T Banh
  • T Banh
    T Banh

    I need to disable inotify in minidlna.conf because the kernel does not support. Is it possible to configure minidlna for autorescan instead of relying on inotify?

  • bob8889

    I haven't been able to get inotify to work so I created a script and used crontab to schedule the minidlna refresh at 4am.

    I created a script with the name /usr/scripts/

    /usr/bin/killall minidlna
    sleep 10
    /usr/sbin/minidlna -R
    sleep 900
    /usr/bin/killall minidlna
    sleep 10

    You may have to increase the sleep command after Minidlna -R since this is the command that rebuilds the database.
    Should probably chmod the file after saving the script. I can't remember what I did with chmod  since I'm new to linux.

    Then run crontab -e and add the following:

    # man 1 crontab for acceptable formats:
    #    <minute> <hour> <day> <month> <dow> <tags and command>
    #    <@freq> <tags and command>
    0 4 * * * /usr/scripts/ > /usr/scripts/minidlna_refresh.log

    That should make it all work.
    This has been very reliable for me and you can run the script manually any time. It takes my dockstar about 10-15 minutes to refresh the database. It depends how may files you have on the drive(s).

    Good Luck

  • Mark Thompson
    Mark Thompson

    If you want to add 'wait_on' package, I have a script which automatically performs a rescan vice using CRON.