1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| #!/bin/bash
LOG_PATH=/tmp/logs
APPS=(blog gogs)
STATIC_HMTL=/tmp/goaccess mkdir -p $STATIC_HMTL for(( i=0;i<${#APPS[@]};i++)) do APP=${APPS[i]}; cat $LOG_PATH/$APP.access.log $LOG_PATH/$APP.error.log > $APP.log goaccess -f $APP.log -o $STATIC_HMTL/$APP.html rm $APP.log done
for(( i=0;i<${#APPS[@]};i++)) do APP=${APPS[i]}; cat $LOG_PATH/$APP.access.log $LOG_PATH/$APP.error.log >> all.log done goaccess -f all.log -o $STATIC_HMTL/all.html rm all.log
|