File tree 2 files changed +4
-6
lines changed
2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 3
3
source /etc/envvars
4
4
5
5
# hit local healthcheck to force create new log
6
- curl -s ' http://localhost /healthcheck?cron=daily-backup'
6
+ curl -s ' http://127.0.0.1 /healthcheck?cron=daily-backup'
7
7
8
8
# reload nginx to make sure new log is created
9
9
/usr/local/openresty/bin/openresty -s reload
@@ -13,9 +13,7 @@ if [[ "$AWS_PATH" != '' ]]; then
13
13
LOGDIR=" /usr/local/openresty/nginx/logs/*.plog" ;
14
14
COUNTER=0;
15
15
16
- # sync all access log files modified more than 2 hours ago
17
- # this mean current date file should not be included if
18
- # you have something correctly hitting health check
16
+ # sync all plog files
19
17
for line in ` ls -t $LOGDIR `
20
18
do
21
19
# echo $line;
@@ -28,7 +26,7 @@ if [[ "$AWS_PATH" != '' ]]; then
28
26
29
27
# only process with valid month
30
28
if [ ! -z " $MONTH " ]; then
31
- # skip first file found
29
+ # skip first file since it's still collecting data
32
30
COUNTER=$( expr $COUNTER + 1)
33
31
if [ $COUNTER -gt 1 ]; then
34
32
s3file=` aws s3 ls s3://$AWS_PATH /year=$YEAR /month=$MONTH /day=$DAY /$file `
Original file line number Diff line number Diff line change @@ -17,4 +17,4 @@ mv /usr/local/openresty/nginx/logs/error.log /usr/local/openresty/nginx/logs/old
17
17
/usr/local/openresty/bin/openresty -s reload
18
18
19
19
# hit local healthcheck to force create new log
20
- curl -s ' http://localhost /healthcheck?cron=update-geo'
20
+ curl -s ' http://127.0.0.1 /healthcheck?cron=update-geo'
You can’t perform that action at this time.
0 commit comments