diff --git a/scripts/scheduler.sh b/scripts/scheduler.sh index c14d963..9da500a 100755 --- a/scripts/scheduler.sh +++ b/scripts/scheduler.sh @@ -7,11 +7,11 @@ service_exec=echo CERT_DIR=/keys -inotifywait --exclude .swp -m -e modify,create -r $CERT_DIR | \ +inotifywait --exclude .swp -m -e CLOSE_WRITE,CLOSE -r $CERT_DIR | \ while read dir op file do - if [[ "${op}" == "CLOSE_WRITE,CLOSE" || "${op}" == "CREATE" ]] ; then + if [[ "${op}" == "CLOSE_WRITE,CLOSE" ]] ; then DOMAIN=$(echo $dir|cut -d / -f3) FILE=$(find /etc/user/config/services/ -name *.json | xargs -I {} jq '{"file": input_filename, "MAIN": ..|.main?'} {} | jq -c 'select(.MAIN | length > 0)' | grep $DOMAIN | jq -r .file)