Sat Jan 14, 2012 9:15 am by manonmoon
Hi Zip,
I completley understand this. I just wanted to provide a workaround till Java 7 and the support is integrated in Serviio.
Also for those who are interested, I slightly modified the script since it did not scan directory names with blanks.
- Code:
#!/bin/bash
#Directories to watch separated by blanks
WATCH="dir1 dir2 dir3"
#Initiate Library Refresh via Rest API
curl -X POST "http://<ServiioIP>/rest/action" -H "Content-Type: text/xml" -d "<action><name>forceLibraryRefresh</name></action>" &> /dev/null
#Incron does not support recursive inotify so we have to create a config file including all directories on our own
cat /dev/null > /etc/incron.d/serviio.conf
while read N; do
DIR=$(echo $N | sed 's/\ /\\\ /g')
echo $DIR "IN_CREATE,IN_MOVED_TO,IN_MOVED_FROM,IN_MOVE_SELF,IN_MODIFY,IN_DELETE_SELF,IN_DELETE <pathtothisscript/thisscript>" >> /etc/incron.d/serviio.conf
done < <(find $WATCH -type d)
Also make sure that you have installed the correct packages. For Ubuntu 10.04:
- Code:
sudo apt-get install curl incron
I hope some may find this useful.
Last edited by
manonmoon on Sat Jan 14, 2012 12:45 pm, edited 1 time in total.