Synology: using synoindex with Docker
Issue: Using a Docker installation it's not possible to access synoindex.
Some workarounds with Synology Task Scheduler can be tried instead. You will found the Task Scheduler in the Control Panel of your DiskStation Manager.
1. Reindex whole folder
Schedule this command with the Task Scheduler:
synoindex -A /myExternalVideoPath
No post-processing command is necessary.
2. Index only new files (advanced solution)
- collect new file names using post-processing option of tvstreamrecord (here the internal Docker path must be used):
sed -i "$ a\%file%" /volume1/common/list.txt
Note: sed have to be used, normal output redirection >> will not work.
- schedule a new script (here the external DS path must be used):
This script will check whether the output file exists. In this case, synoindex will be called for each line of this file and the file will be removed afterwards. This solution should have a smaller impact and could thus be run more often.
#bin/sh
file="/myExternalVideoPath/list.txt"
if test -f $file; then
while read p; do
synoindex -a "$p"
done < $file
rm $file
fi
Feedback / confirmation are welcome.