#!/bin/bash FILE_TO_BE_WATCHED="/var/log/lliurex-lwatlogs/prebackend" while [ -f "$FILE_TO_BE_WATCHED" ]; do llxcfg-ldap clean-logs sleep 10 done exit 0