From 81bf6131d6c3d8275e63fd398ac6d8feeab10137 Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Wed, 2 Mar 2016 21:35:17 +0000 Subject: [PATCH] make sure you create the target directory --- roles/awstats/files/combineHttpLogs.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roles/awstats/files/combineHttpLogs.sh b/roles/awstats/files/combineHttpLogs.sh index 429aca7b89..c825c49c42 100644 --- a/roles/awstats/files/combineHttpLogs.sh +++ b/roles/awstats/files/combineHttpLogs.sh @@ -22,6 +22,9 @@ AWSTATS=/usr/share/awstats/tools/logresolvemerge.pl FILES=$( ls -1 ${HTTPLOG}/*access.log.xz | awk '{x=split($0,a,"/"); print a[x]}' | sort -u ) + +mkdir -p ${TARGET} + for FILE in ${FILES}; do TEMP=$(echo ${FILE} | sed 's/\.xz$//') perl ${AWSTATS} ${HTTPLOG}/${FILE} > ${TARGET}/${TEMP}