From 12aa409cadc02590c3f6d4a1759309836c8da129 Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Sat, 9 Apr 2016 16:18:35 +0200 Subject: [PATCH] seems to work now --- README.markdown | 3 +++ docker-compose.yml | 2 +- mirror.run | 3 +++ mirror/syncubuntu.sh | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index f4a983b..db194c1 100644 --- a/README.markdown +++ b/README.markdown @@ -23,6 +23,9 @@ Then even your builds (where you can't specify links) will go fast. * default `archive.ubuntu.com`. * You may want `xx.archive.ubuntu.com` (where `xx` is your country code). +* `MIRROR_INTERVAL_SECONDS` - mirror sync interval + * default `43200` (12h) + * You may want `10800` (3h) # Example dnsmasq setup diff --git a/docker-compose.yml b/docker-compose.yml index c3a2c65..25990a6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ services: image: sneak/ubuntumirror network_mode: bridge volumes: - - "/storage/nobackup/mirrors:/var/mirror" + - "/var/mirror:/var/mirror" ports: - "172.17.0.1:80:80" environment: diff --git a/mirror.run b/mirror.run index 3c2dca7..23f6690 100644 --- a/mirror.run +++ b/mirror.run @@ -1,5 +1,8 @@ #!/bin/bash +# HOME isn't set up for some reason +export HOME=/root + cd /opt/mirror && make sleep ${MIRROR_INTERVAL_SECONDS:-43200} diff --git a/mirror/syncubuntu.sh b/mirror/syncubuntu.sh index 964b341..23a713f 100755 --- a/mirror/syncubuntu.sh +++ b/mirror/syncubuntu.sh @@ -4,6 +4,8 @@ set -x THISDIR="$(cd $(dirname "$BASH_SOURCE") && pwd -P)" DST="/var/mirror" +mkdir -p "$DST/ubuntu" + export GNUPGHOME="/etc/debmirror/ubuntu" debmirror \