From f9aaac4a70f8c95a4b7fb7f8e436ba8a166a01d4 Mon Sep 17 00:00:00 2001 From: z4yx Date: Sat, 21 Mar 2020 12:49:13 +0800 Subject: [PATCH] fix the log filename --- debian.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian.sh b/debian.sh index 891a292..0735030 100755 --- a/debian.sh +++ b/debian.sh @@ -24,7 +24,7 @@ if [[ $1 == sync:archive:* ]]; then tail --retry -f "${FTPSYNC_LOG_DIR}/rsync-ftpsync-${jobname}.log" & tail --retry -f "${FTPSYNC_LOG_DIR}/rsync-ftpsync-${jobname}.error" & wait $PID - sz=$(tail -n 15 ${FTPSYNC_LOG_DIR}/rsync-ftpsync-${jobname}.log|grep -Po '(?<=Total file size: )\d+') + sz=$(tail -n 15 ${FTPSYNC_LOG_DIR}/rsync-ftpsync-${jobname}.log.0|grep -Po '(?<=Total file size: )\d+') [[ -z "$sz" ]] || echo "Total size is" $(numfmt --to=iec $sz) else echo "Invalid command line"