Fotobox1/monitor_upload.sh
2025-06-27 09:51:04 +02:00

12 lines
264 B
Bash
Executable File

#!/bin/bash
INTERVAL="10"
while true; do
uploads="$(find "$(dirname "$0")/images/0-CURRENT/upload" -maxdepth 1 -type f -name '*.jpg')"
if [ "$uploads" != "" ]; then
scp $uploads root@10.17.0.2:/root/monitor/images && rm -f $uploads
fi
sleep $INTERVAL
done