2025.04.10_11:30

This commit is contained in:
2025-04-10 11:30:22 +02:00
parent bb6f3db13e
commit 182023b312
15 changed files with 1578 additions and 1 deletions

View File

@ -0,0 +1,63 @@
#!/bin/bash
#
# Check if user is root
#
if [ $(id -u) != "0" ]; then
echo "Error: You must be root to run this script, please use the root user to install the software."
exit 1
fi
if [ ! -f /etc/debian_version ]; then
echo "Unsupported Linux Distribution. Prepared for Debian"
exit 1
fi
################################################################################
#
# Hostname: aptcache.dmz.lan
#
# IP: 192.168.50.10/24
#
# URL: http://192.168.50.10:3142/acng-report.html
#
# OS: Debain 12
#
# Container ID: 100
#
# Node: PVE01
#
################################################################################
#
# root pass: master_user@apt-cacher#01
# admin pass: admin_user@apt-cacer#01
#
################################################################################
apt install -y \
avahi-daemon \
apt-cacher-ng \
apt-listchanges \
apt-transport-https
# mkdir /var/cache/apt-cacher-ng/_import
# chown -R apt-cacher-ng /var/cache/apt-cacher-ng/_import
echo "PassThroughPattern: ^(.*):443$" >> /etc/apt-cacher-ng/acng.conf
echo -e '\033[33m------Setup Apt-Sources and Upgrade System------\033[33m'
echo -e "\033[0m"
sleep 2
mv /etc/apt/sources.list /etc/apt/sources.list.default
cat > /etc/apt/sources.list <<"EOF"
#deb http://127.0.0.1:3142/ftp.de.debian.org/debian/ stable main contrib non-free non-free-firmware
#deb http://127.0.0.1:3142/ftp.de.debian.org/debian/ stable-updates main contrib non-free non-free-firmware
#deb http://127.0.0.1:3142/security.debian.org/ stable/updates main contrib non-free non-free-firmware
deb http://127.0.0.1:3142/deb.debian.org/debian bookworm main contrib non-free non-free-firmware
deb http://127.0.0.1:3142/deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
deb http://127.0.0.1:3142/deb.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware
deb http://127.0.0.1:3142/ftp.debian.org/debian bookworm-backports main contrib non-free non-free-firmware
EOF
apt autoremove && apt autoclean && apt clean