Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

auto-rescan after disable inotify

T Banh
2011-03-06
2013-05-29
  • 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/minidlna_refresh.sh

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

    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/minidlna_refresh.sh > /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
    2012-10-24

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