summaryrefslogtreecommitdiff
path: root/www/thundercache/files/log.sh.in
blob: 74975c4df19c900e67ea736d4f003155a41c6cc8 (plain) (blame)
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
26
27
#!/bin/sh
export PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin"
#
# Patrick Tracanelli <eksffa@freebsdbrasil.com.br>
#
# Config
#
PHP="%%PREFIX%%/bin/php"
THUNDERLOG="%%PREFIX%%/thunder/sbin/thunderlog.php"
DB="thunder"
HOST="localhost"
USER="thunder"
PASS="thundercache"
LOG="%%PREFIX%%/thunder/logs"
LOGTEMP="%%PREFIX%%/thunder/logs/tmp"
SCRIPTLOG="/dev/null" # mude para /tmp/scriptlog.log para debugar se preciso

#
# Simply populate some stats andresets access.log
#

cp -f ${LOG}/access.log ${LOGTEMP}/access.log

:> ${LOG}/access.log

$PHP $THUNDERLOG $HOST $DB $USER $PASS $LOGTEMP/access.log >>${SCRIPTLOG} 2>&1 && rm -f $LOGTEMP/access.log