mc_watcher.sh 219 Bytes Edit Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 #!/bin/bash TARGET_DIR="/data/" mc watch --recursive ${TARGET_DIR} --events put | while read events; do hostUrl=${events#*/data} echo "${bucket_name}${hostUrl}" > /dev/udp/${udp_server_ip}/${udp_server_port} done