added aptcacherng CT, Updated readme
This commit is contained in:
25
CT-Files/aptcacherng/Configs/acng.conf
Normal file
25
CT-Files/aptcacherng/Configs/acng.conf
Normal file
@@ -0,0 +1,25 @@
|
||||
Port:80
|
||||
# Storage directory for downloaded data and related maintenance activity.
|
||||
CacheDir: /var/cache/apt-cacher-ng
|
||||
LogDir: /var/log/apt-cacher-ng
|
||||
SupportDir: /usr/lib/apt-cacher-ng
|
||||
|
||||
# Repository remapping
|
||||
Remap-debrep: file:deb_mirror*.gz /debian ; file:backends_debian # Debian Archives
|
||||
Remap-uburep: file:ubuntu_mirrors /ubuntu ; file:backends_ubuntu # Ubuntu Archives
|
||||
Remap-epel: file:epel_mirrors # Fedora EPEL
|
||||
Remap-secdeb: security.debian.org security.debian.org/debian-security deb.debian.org/debian-security /debian-security ; deb.debian.org/debian-security security.debian.org
|
||||
Remap-centos: file:centos_mirrors /centos ; http://mirror.ams1.nl.leaseweb.net/centos
|
||||
Remap-alpine: file:alpine_mirrors /alpine ; http://dl-4.alpinelinux.org/alpine
|
||||
|
||||
ReportPage: acng-report.html
|
||||
|
||||
ExThreshold: 4
|
||||
|
||||
LocalDirs: acng-doc /usr/share/doc/apt-cacher-ng
|
||||
|
||||
VfilePatternEx: (metalink\?repo=[0-9a-zA-Z-]+&arch=[0-9a-zA-Z_-]+|/\?release=[0-9]+&arch=|repodata/.*\.(xml|sqlite)\.(gz|bz2)|APKINDEX.tar.gz|filelists\.xml\.gz|filelists\.sqlite\.bz2|repomd\.xml|packages\.[a-zA-Z][a-zA-Z]\.gz|\.sha256)
|
||||
PfilePatternEx: (/dists/.*/by-hash/.*|\.tgz|\.tar|\.xz|\.bz2|\.rpm|\.apk)$
|
||||
|
||||
UserAgent: Yet Another HTTP Client/1.2.3p4
|
||||
DontCache: mirrorlist.centos.org
|
||||
10
CT-Files/aptcacherng/Scripts/Init.sh
Normal file
10
CT-Files/aptcacherng/Scripts/Init.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/ash
|
||||
#Allow apt-cacher-ng to use port 80
|
||||
setcap 'cap_net_bind_service=+ep' /usr/sbin/apt-cacher-ng
|
||||
#Move configs in place
|
||||
mv /opt/Setup/Configs/acng.conf /etc/apt-cacher-ng/acng.conf
|
||||
mv /opt/Setup/centos_mirrors /etc/apt-cacher-ng/centos_mirrors
|
||||
mv /opt/Setup/alpine_mirrors /etc/apt-cacher-ng/alpine_mirrors
|
||||
mv /opt/Setup/Scripts/UpdateMirrorList.sh /opt/UpdateMirrorList.sh
|
||||
#Enable apt-cacher-ng on startup
|
||||
ln -s /lib/systemd/system/apt-cacher-ng.service /etc/systemd/system/multi-user.target.wants/apt-cacher-ng.service
|
||||
3
CT-Files/aptcacherng/Scripts/UpdateMirrorList.sh
Normal file
3
CT-Files/aptcacherng/Scripts/UpdateMirrorList.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/ash
|
||||
curl -L --retry 7 --retry-delay 5 http://dl-4.alpinelinux.org/alpine/MIRRORS.txt -o /etc/apt-cacher-ng/alpine_mirrors
|
||||
curl https://www.centos.org/download/full-mirrorlist.csv | sed 's/^.*"http:/http:/' | sed 's/".*$//' | grep ^http >/etc/apt-cacher-ng/centos_mirrors
|
||||
Reference in New Issue
Block a user