auto-rescan after disable inotify

T Banh
  • T Banh

    T Banh - 2011-03-06

    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

    bob8889 - 2011-04-02

    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

    • Matej Cepl

      Matej Cepl - 2016-04-16

      Are you sure you need to kill the daemon after minidlna -R? Couldn't you just let it run?

  • Mark Thompson

    Mark Thompson - 2012-10-24

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


Log in to post a comment.