Commit ffc8ae54b7d1688babbc972694a9d5fccf76c93a

Authored by Liu Haoyu
1 parent b36ceb5c

bucket_name指定错误修复, 监听事件减少

docker-entrypoint.sh
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 2
3 # mc alias set 3 # mc alias set
4 mc alias set local ${minio_endpoint} ${minio_access_key} ${minio_secret_key} 4 mc alias set local ${minio_endpoint} ${minio_access_key} ${minio_secret_key}
5 -nohup mc mirror -w /data/ local/${bucket_name}/ & 5 +nohup mc mirror -w /data/ local/${bucket_name} &
6 6
7 # mc watcher 7 # mc watcher
8 -mc_watcher.sh  
9 \ No newline at end of file 8 \ No newline at end of file
  9 +mc_watcher.sh
mc_watcher.sh
@@ -2,8 +2,8 @@ @@ -2,8 +2,8 @@
2 2
3 TARGET_DIR="/data/" 3 TARGET_DIR="/data/"
4 4
5 -mc watch --recursive local/togoftp | while read events; 5 +mc watch --recursive ${TARGET_DIR} --events put | while read events;
6 do 6 do
7 - hostUrl=${events#*//}  
8 - echo "${hostUrl#*/}" > /dev/udp/${udp_server_ip}/${udp_server_port}  
9 -done  
10 \ No newline at end of file 7 \ No newline at end of file
  8 + hostUrl=${events#*/data}
  9 + echo "${bucket_name}${hostUrl}" > /dev/udp/${udp_server_ip}/${udp_server_port}
  10 +done