mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 04:52:11 +00:00
apt-fast, fix netselect-apt
This commit is contained in:
parent
52918767f6
commit
2c7c5b656d
3 changed files with 28 additions and 14 deletions
|
@ -13,8 +13,8 @@ myTPOTCOMPOSE="/opt/tpot/etc/tpot.yml"
|
||||||
myLSB_STABLE_SUPPORTED="stretch"
|
myLSB_STABLE_SUPPORTED="stretch"
|
||||||
myLSB_TESTING_SUPPORTED="sid"
|
myLSB_TESTING_SUPPORTED="sid"
|
||||||
myREMOTESITES="https://hub.docker.com https://github.com https://pypi.python.org https://debian.org"
|
myREMOTESITES="https://hub.docker.com https://github.com https://pypi.python.org https://debian.org"
|
||||||
myPREINSTALLPACKAGES="apache2-utils curl dialog figlet grc libcrack2 libpq-dev lsb-release netselect-apt net-tools software-properties-common toilet"
|
myPREINSTALLPACKAGES="aria2 apache2-utils curl dialog figlet grc libcrack2 libpq-dev lsb-release netselect-apt net-tools software-properties-common toilet"
|
||||||
myINSTALLPACKAGES="apache2-utils apparmor apt-transport-https aufs-tools bash-completion build-essential ca-certificates cgroupfs-mount cockpit cockpit-docker console-setup console-setup-linux curl debconf-utils dialog dnsutils docker.io docker-compose dstat ethtool fail2ban figlet genisoimage git glances grc haveged html2text htop iptables iw jq kbd libcrack2 libltdl7 man mosh multitail netselect-apt net-tools npm ntp openssh-server openssl pass prips software-properties-common syslinux psmisc pv python-pip toilet unattended-upgrades unzip vim wget wireless-tools wpasupplicant"
|
myINSTALLPACKAGES="aria2 apache2-utils apparmor apt-transport-https aufs-tools bash-completion build-essential ca-certificates cgroupfs-mount cockpit cockpit-docker console-setup console-setup-linux curl debconf-utils dialog dnsutils docker.io docker-compose dstat ethtool fail2ban figlet genisoimage git glances grc haveged html2text htop iptables iw jq kbd libcrack2 libltdl7 man mosh multitail netselect-apt net-tools npm ntp openssh-server openssl pass prips software-properties-common syslinux psmisc pv python-pip toilet unattended-upgrades unzip vim wget wireless-tools wpasupplicant"
|
||||||
myINFO="\
|
myINFO="\
|
||||||
########################################
|
########################################
|
||||||
### T-Pot Installer for Debian (Sid) ###
|
### T-Pot Installer for Debian (Sid) ###
|
||||||
|
@ -213,6 +213,8 @@ fi
|
||||||
# If not present install them
|
# If not present install them
|
||||||
function fuCHECKPACKAGES {
|
function fuCHECKPACKAGES {
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
echo "### Installing apt-fast"
|
||||||
|
/bin/bash -c "$(curl -sL https://raw.githubusercontent.com/ilikenwf/apt-fast/master/quick-install.sh)"
|
||||||
echo -n "### Checking for installer dependencies: "
|
echo -n "### Checking for installer dependencies: "
|
||||||
local myPACKAGES="$1"
|
local myPACKAGES="$1"
|
||||||
for myDEPS in $myPACKAGES;
|
for myDEPS in $myPACKAGES;
|
||||||
|
@ -221,8 +223,8 @@ function fuCHECKPACKAGES {
|
||||||
if [ "$myOK" != "ok" ];
|
if [ "$myOK" != "ok" ];
|
||||||
then
|
then
|
||||||
echo "[ NOW INSTALLING ]"
|
echo "[ NOW INSTALLING ]"
|
||||||
apt-get update -y
|
apt-fast update -y
|
||||||
apt-get install -y $myPACKAGES
|
apt-fast install -y $myPACKAGES
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -268,21 +270,31 @@ function fuGET_DEPS {
|
||||||
echo "### Determine fastest mirror for your location."
|
echo "### Determine fastest mirror for your location."
|
||||||
echo
|
echo
|
||||||
netselect-apt -n -a amd64 unstable && cp sources.list /etc/apt/
|
netselect-apt -n -a amd64 unstable && cp sources.list /etc/apt/
|
||||||
|
mySOURCESCHECK=$(cat /etc/apt/sources.list | grep -c unstable)
|
||||||
|
if [ "$mySOURCESCHECK" == "0" ]
|
||||||
|
then
|
||||||
|
echo "### Automatic mirror selection failed, using main mirror."
|
||||||
|
# Point to Debian (Sid, unstable)
|
||||||
|
tee /etc/apt/sources.list <<EOF
|
||||||
|
deb http://deb.debian.org/debian unstable main contrib non-free
|
||||||
|
deb-src http://deb.debian.org/debian unstable main contrib non-free
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
echo
|
echo
|
||||||
echo "### Getting update information."
|
echo "### Getting update information."
|
||||||
echo
|
echo
|
||||||
apt-get -y update
|
apt-fast -y update
|
||||||
echo
|
echo
|
||||||
echo "### Upgrading packages."
|
echo "### Upgrading packages."
|
||||||
echo
|
echo
|
||||||
# Downlaod and upgrade packages, but silently keep existing configs
|
# Downlaod and upgrade packages, but silently keep existing configs
|
||||||
echo "docker.io docker.io/restart boolean true" | debconf-set-selections -v
|
echo "docker.io docker.io/restart boolean true" | debconf-set-selections -v
|
||||||
echo "debconf debconf/frontend select noninteractive" | debconf-set-selections -v
|
echo "debconf debconf/frontend select noninteractive" | debconf-set-selections -v
|
||||||
apt-get -y dist-upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes
|
apt-fast -y dist-upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes
|
||||||
echo
|
echo
|
||||||
echo "### Installing T-Pot dependencies."
|
echo "### Installing T-Pot dependencies."
|
||||||
echo
|
echo
|
||||||
apt-get -y install $myINSTALLPACKAGES
|
apt-fast -y install $myINSTALLPACKAGES
|
||||||
# Remove exim4
|
# Remove exim4
|
||||||
apt-get -y purge exim4-base mailutils
|
apt-get -y purge exim4-base mailutils
|
||||||
apt-get -y autoremove
|
apt-get -y autoremove
|
||||||
|
@ -653,7 +665,7 @@ pip install elasticsearch-curator yq
|
||||||
|
|
||||||
# Cloning T-Pot from GitHub
|
# Cloning T-Pot from GitHub
|
||||||
fuBANNER "Cloning T-Pot"
|
fuBANNER "Cloning T-Pot"
|
||||||
git clone https://github.com/dtag-dev-sec/tpotce /opt/tpot
|
git clone https://github.com/dtag-dev-sec/tpotce -b fast /opt/tpot
|
||||||
|
|
||||||
# Let's create the T-Pot user
|
# Let's create the T-Pot user
|
||||||
fuBANNER "Create user"
|
fuBANNER "Create user"
|
||||||
|
|
|
@ -131,7 +131,7 @@ in-target apt-get -y install grub-pc; \
|
||||||
in-target grub-install --force $(debconf-get partman-auto/disk); \
|
in-target grub-install --force $(debconf-get partman-auto/disk); \
|
||||||
update-dev; \
|
update-dev; \
|
||||||
in-target update-grub; \
|
in-target update-grub; \
|
||||||
in-target git clone --depth=1 https://github.com/dtag-dev-sec/tpotce /opt/tpot; \
|
in-target git clone --depth=1 https://github.com/dtag-dev-sec/tpotce -b fast /opt/tpot; \
|
||||||
in-target sed -i 's/allow-hotplug/auto/g' /etc/network/interfaces; \
|
in-target sed -i 's/allow-hotplug/auto/g' /etc/network/interfaces; \
|
||||||
#in-target apt-get -y remove exim4-base; \
|
#in-target apt-get -y remove exim4-base; \
|
||||||
#in-target apt-get -y autoremove; \
|
#in-target apt-get -y autoremove; \
|
||||||
|
|
12
update.sh
12
update.sh
|
@ -58,7 +58,7 @@ function fuSELFUPDATE () {
|
||||||
echo "###### $myBLUE""No updates found in repository.""$myWHITE"
|
echo "###### $myBLUE""No updates found in repository.""$myWHITE"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
myRESULT=$(git diff --name-only origin/master | grep update.sh)
|
myRESULT=$(git diff --name-only origin/fast | grep update.sh)
|
||||||
if [ "$myRESULT" == "update.sh" ];
|
if [ "$myRESULT" == "update.sh" ];
|
||||||
then
|
then
|
||||||
echo "###### $myBLUE""Found newer version, will be pulling updates and restart myself.""$myWHITE"
|
echo "###### $myBLUE""Found newer version, will be pulling updates and restart myself.""$myWHITE"
|
||||||
|
@ -176,18 +176,20 @@ echo
|
||||||
|
|
||||||
function fuUPDATER () {
|
function fuUPDATER () {
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
local myPACKAGES="apache2-utils apparmor apt-transport-https aufs-tools bash-completion build-essential ca-certificates cgroupfs-mount cockpit cockpit-docker console-setup console-setup-linux curl debconf-utils dialog dnsutils docker.io docker-compose dstat ethtool fail2ban figlet genisoimage git glances grc haveged html2text htop iptables iw jq kbd libcrack2 libltdl7 man mosh multitail netselect-apt net-tools npm ntp openssh-server openssl pass prips software-properties-common syslinux psmisc pv python-pip toilet unattended-upgrades unzip vim wget wireless-tools wpasupplicant"
|
echo "### Installing apt-fast"
|
||||||
|
/bin/bash -c "$(curl -sL https://raw.githubusercontent.com/ilikenwf/apt-fast/master/quick-install.sh)"
|
||||||
|
local myPACKAGES="aria2 apache2-utils apparmor apt-transport-https aufs-tools bash-completion build-essential ca-certificates cgroupfs-mount cockpit cockpit-docker console-setup console-setup-linux curl debconf-utils dialog dnsutils docker.io docker-compose dstat ethtool fail2ban figlet genisoimage git glances grc haveged html2text htop iptables iw jq kbd libcrack2 libltdl7 man mosh multitail netselect-apt net-tools npm ntp openssh-server openssl pass prips software-properties-common syslinux psmisc pv python-pip toilet unattended-upgrades unzip vim wget wireless-tools wpasupplicant"
|
||||||
echo "### Now upgrading packages ..."
|
echo "### Now upgrading packages ..."
|
||||||
dpkg --configure -a
|
dpkg --configure -a
|
||||||
apt-get -y autoclean
|
apt-get -y autoclean
|
||||||
apt-get -y autoremove
|
apt-get -y autoremove
|
||||||
apt-get update
|
apt-fast update
|
||||||
apt-get -y install $myPACKAGES
|
apt-fast -y install $myPACKAGES
|
||||||
|
|
||||||
# Some updates require interactive attention, and the following settings will override that.
|
# Some updates require interactive attention, and the following settings will override that.
|
||||||
echo "docker.io docker.io/restart boolean true" | debconf-set-selections -v
|
echo "docker.io docker.io/restart boolean true" | debconf-set-selections -v
|
||||||
echo "debconf debconf/frontend select noninteractive" | debconf-set-selections -v
|
echo "debconf debconf/frontend select noninteractive" | debconf-set-selections -v
|
||||||
apt-get -y dist-upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes
|
apt-fast -y dist-upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes
|
||||||
dpkg --configure -a
|
dpkg --configure -a
|
||||||
npm install "https://github.com/taskrabbit/elasticsearch-dump" -g
|
npm install "https://github.com/taskrabbit/elasticsearch-dump" -g
|
||||||
pip install --upgrade pip
|
pip install --upgrade pip
|
||||||
|
|
Loading…
Reference in a new issue