uShare Linux/Ubuntu Based UPNP Media Server Auto Refresh
As you might know, I use my Ubuntu box as a media server that streams content to my Xbox/PS3. I currently use uShare because of it’s easy configuration (and it’s the only one I’ve found that works for me 100%!). The only problem with the software was that if something was added to my media directory, I would have to reboot in order for it to rescan my media directories.
Today I’ve come up with a way to address this issue which is actually so simple I’m not sure why I never though of it before. All you have to do is enable the web interface for uShare, and add a crontab using this command:
sudo crontab -e
Then:
5,15,20,25,30,35,40,45,50,55 * * * * wget http://127.0.0.1:[port]/web/ushare.cgi?action=refresh -o -
This should refresh your share every 5 minutes. I’m probably going to make mine scan every 15-30 minutes because this would probably spike the CPU too much for my personal media directory at 5 minutes.
I’ve used ushare for years without having an easy way to update the files, and now that I’ve figured this out, I’m going to be much happier with my server.



