bignellrp bignellrp - 2 months ago
144 0

JohnD's script for indexing on synology with bash. I cant get this to work so need some assistance.

Bash

Synology NAS – automatically indexing new files

#!/bin/sh -x
logfile="/volume1/share/indexdownloads.log"
recentfile="/volume1/share/recentfile.txt"

echo "____________" >>$logfile
echo "Starting indexing of new downloads at: "`date` >>$logfile
echo >> $logfile

find /volume1/video -cmin -15 >$recentfile

while read aline
do
echo "Processing: $aline" >> $logfile 2>&1
synoindex -a "$aline" >>$logfile 2>&1
done > $logfile
Comments