Compare commits
11 Commits
a2b750a71e
...
prod
| Author | SHA1 | Date | |
|---|---|---|---|
| 46c0505f04 | |||
| b4c6017871 | |||
| 3b7d6a38e9 | |||
| 6f8da3c8e4 | |||
| caece7197d | |||
| c549c75107 | |||
| bc3736a5a4 | |||
| 6f8096650c | |||
| 2e84d93951 | |||
| be0d3cb859 | |||
| d402abd69b |
@@ -6,8 +6,9 @@ ENV MIRROR_UPDATE_INTERVAL_SECONDS 43200
|
||||
ENV UBUNTU_MIRROR_ARCHITECTURES amd64
|
||||
# set to anything but 'false' to mirror source code as well
|
||||
ENV UBUNTU_ENABLE_SOURCE_MIRRORING false
|
||||
ENV UBUNTU_MIRROR_CATEGORIES main,universe,restricted,multiverse
|
||||
ENV UBUNTU_MIRROR_CATEGORIES main,universe,restricted,multiverse,main/debian-installer
|
||||
ENV UBUNTU_MIRROR_UPSTREAM archive.ubuntu.com
|
||||
ENV UBUNTU_MIRROR_UPSTREAM_PATH /ubuntu
|
||||
ENV UBUNTU_MIRROR_PROJECTS bionic,bionic-updates,bionic-security,bionic-backports,focal,focal-updates,focal-security,focal-backports
|
||||
|
||||
# The following is the URL populated in /mirrors.txt as used by mirror://
|
||||
|
||||
39
mirror/syncubuntu.sh
Executable file → Normal file
39
mirror/syncubuntu.sh
Executable file → Normal file
@@ -16,17 +16,30 @@ 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
|
||||
DIDIST="$(
|
||||
echo -n "$UBUNTU_MIRROR_PROJECTS" | tr "," "\n" | grep -v "\-" | tr "\n" ","
|
||||
)"
|
||||
|
||||
while [[ $DONE -eq 0 ]]; do
|
||||
debmirror \
|
||||
-a ${UBUNTU_MIRROR_ARCHITECTURES} \
|
||||
-s ${UBUNTU_MIRROR_CATEGORIES} \
|
||||
-h ${UBUNTU_MIRROR_UPSTREAM} \
|
||||
-d ${UBUNTU_MIRROR_PROJECTS} \
|
||||
$SOURCEOPT \
|
||||
--di-dist="$DIDIST" \
|
||||
--di-arch=arches \
|
||||
--ignore-small-errors \
|
||||
-r "$UBUNTU_MIRROR_UPSTREAM_PATH" \
|
||||
--getcontents \
|
||||
--progress \
|
||||
--method=http \
|
||||
$DST/ubuntu
|
||||
if [[ $? -eq 0 ]]; then
|
||||
DONE=1
|
||||
fi
|
||||
chmod -R a+rX $DST
|
||||
sleep 1
|
||||
done
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -30,12 +33,12 @@ http {
|
||||
|
||||
index index.html index.htm;
|
||||
|
||||
#location /ubuntu/ {
|
||||
location /ubuntu/ {
|
||||
# # alias, not root!
|
||||
# # trailing slash important!
|
||||
# alias /var/mirror/ubuntu/;
|
||||
# autoindex on;
|
||||
#}
|
||||
autoindex on;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user