From d402abd69bf658efe0a94346fccec08577726db8 Mon Sep 17 00:00:00 2001 From: sneak Date: Sun, 16 Feb 2020 06:05:16 -0800 Subject: [PATCH] make nginx log to stdout --- mirror/syncubuntu.sh | 33 ++++++++++++++++++++------------- nginx.conf | 3 +++ 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/mirror/syncubuntu.sh b/mirror/syncubuntu.sh index bef17aa..dc7c53c 100755 --- a/mirror/syncubuntu.sh +++ b/mirror/syncubuntu.sh @@ -16,17 +16,24 @@ if [[ "$UBUNTU_ENABLE_SOURCE_MIRRORING" != "false" ]]; then SOURCEOPT="--source" fi -debmirror \ - -a ${UBUNTU_MIRROR_ARCHITECTURES} \ - -s ${UBUNTU_MIRROR_CATEGORIES} \ - -h ${UBUNTU_MIRROR_UPSTREAM} \ - -d ${UBUNTU_MIRROR_PROJECTS} \ - $SOURCEOPT \ - --ignore-small-errors \ - -r /ubuntu \ - --getcontents \ - --progress \ - --method=http \ - $DST/ubuntu +DONE=0 -chmod -R a+rX $DST +while [[ $DONE -eq 0 ]]; do + debmirror \ + -a ${UBUNTU_MIRROR_ARCHITECTURES} \ + -s ${UBUNTU_MIRROR_CATEGORIES} \ + -h ${UBUNTU_MIRROR_UPSTREAM} \ + -d ${UBUNTU_MIRROR_PROJECTS} \ + $SOURCEOPT \ + --ignore-small-errors \ + -r /ubuntu \ + --getcontents \ + --progress \ + --method=http \ + $DST/ubuntu + if [[ $? -eq 0 ]]; then + DONE=1 + fi + chmod -R a+rX $DST + sleep 1 +done diff --git a/nginx.conf b/nginx.conf index d126cb8..dae74ef 100644 --- a/nginx.conf +++ b/nginx.conf @@ -3,11 +3,14 @@ worker_processes auto; pid /var/run/nginx.pid; +error_log /dev/stdout info; + events { worker_connections 1024; } http { + access_log /dev/stdout; include /etc/nginx/mime.types; default_type application/octet-stream;