#!/bin/sh -x

TEMP1=$(mktemp)
TEMP2=$(mktemp)

${BINARY} cli config folders list > ${TEMP1}

for i in `cat ${TEMP1}`
do
 echo $i
 ${BINARY} cli config folders $i rescan-intervals set ${RESCANINTERVAL}
 ${BINARY} cli config folders $i fswatcher-enabled set ${FSWATCHER}
 ${BINARY} cli config folders $i min-disk-free unit set GB
 ${BINARY} cli config folders $i min-disk-free value set ${MINSPACE}
done

rm -f ${TEMP1} ${TEMP2}