This commit is contained in:
2025-10-30 18:14:59 -04:00
2 changed files with 23 additions and 19 deletions

View File

@@ -3,13 +3,13 @@
# CyberChef web directory # CyberChef web directory
CYBERCHEF_DIRECTORY="/var/www/public/cyberchef" CYBERCHEF_DIRECTORY="/var/www/public/cyberchef"
# download srouce code of latest releases page # download srouce code of latest releases page
HTML_SOURCE=$(wget -O - https://api.github.com/repos/gchq/CyberChef/releases/latest) CYBERCHEF_RELEASES_API=$(wget -O - https://api.github.com/repos/gchq/CyberChef/releases/latest)
# version # version
VERSION=$(echo ${HTML_SOURCE} | jq -r .tag_name) VERSION=$(echo ${CYBERCHEF_RELEASES_API} | jq -r .tag_name)
# get download url # get download url
DOWNLOAD_URL=$(echo ${HTML_SOURCE} | jq -r .assets[].browser_download_url) DOWNLOAD_URL=$(echo ${CYBERCHEF_RELEASES_API} | jq -r .assets[].browser_download_url)
# get filename # get filename
FILENAME=$(echo ${HTML_SOURCE} | jq -r .assets[].name) FILENAME=$(echo ${CYBERCHEF_RELEASES_API} | jq -r .assets[].name)
# test if version is already downloaded # test if version is already downloaded
if [ $(ls ${CYBERCHEF_DIRECTORY}/*${VERSION}* | wc -l) -gt 0 ]; then if [ $(ls ${CYBERCHEF_DIRECTORY}/*${VERSION}* | wc -l) -gt 0 ]; then

View File

@@ -44,7 +44,7 @@ if [ ${OS} == "Debian" ] || [ ${OS} == "Ubuntu" ]; then
apt update; apt upgrade -y apt update; apt upgrade -y
# install the packages on all systems # install the packages on all systems
apt install -y apt-transport-https wget tar gnupg2 sudo dnsutils rsync nano htop nload iperf iperf3 unattended-upgrades unzip bzip2 git nfs-common uptimed net-tools build-essential curl realmd oddjob oddjob-mkhomedir sssd sssd-tools libnss-sss libpam-sss adcli mlocate ncdu wireguard clevis apt install -y apt-transport-https wget tar gnupg2 sudo dnsutils rsync nano htop nload iperf iperf3 unattended-upgrades unzip bzip2 git nfs-common uptimed net-tools build-essential curl realmd oddjob oddjob-mkhomedir sssd sssd-tools libnss-sss libpam-sss adcli ncdu wireguard clevis jq
# enable unattended-upgrades # enable unattended-upgrades
echo unattended-upgrades unattended-upgrades/enable_auto_updates boolean true | debconf-set-selections echo unattended-upgrades unattended-upgrades/enable_auto_updates boolean true | debconf-set-selections
@@ -62,6 +62,13 @@ if [ ${OS} == "Debian" ] || [ ${OS} == "Ubuntu" ]; then
apt install -y qemu-guest-agent apt install -y qemu-guest-agent
fi fi
# FastFetch install
#FASTFETCH_FILENAME="fastfetch-linux-amd64.deb"
# download srouce code of latest releases page
FASTFETCH_RELEASES_API=$(wget -O - https://api.github.com/repos/fastfetch-cli/fastfetch/releases/latest)
DOWNLOAD_URL=$(echo ${FASTFETCH_RELEASES_API} | jq -r '.assets[].browser_download_url | select(. | endswith("fastfetch-linux-amd64.deb"))')
wget -P /tmp ${DOWNLOAD_URL}
apt install --yes /tmp/fastfetch-linux-amd64.deb
# remove unneeded packages # remove unneeded packages
apt autoremove -y apt autoremove -y
@@ -91,7 +98,7 @@ elif [ "${OS}" == "CentOS" ] || [ "${OS}" == "Rocky" ]; then
yum autoremove -y yum autoremove -y
# install the packages # install the packages
yum install -y sudo rsync tar nano htop nload iperf iperf3 bind-utils yum-cron unzip bzip2 nfs-utils git wget uptimed net-tools make realmd oddjob oddjob-mkhomedir sssd adcli mlocate ncdu wireguard clevis yum install -y sudo rsync tar nano htop nload iperf iperf3 bind-utils yum-cron unzip bzip2 nfs-utils git wget uptimed net-tools make realmd oddjob oddjob-mkhomedir sssd adcli ncdu wireguard clevis jq
# install vm tools # install vm tools
if [ "${VM}" == "true" ]; then if [ "${VM}" == "true" ]; then
@@ -129,7 +136,7 @@ elif [ "${OS}" == "CentOS" ] || [ "${OS}" == "Rocky" ]; then
dnf autoremove -y dnf autoremove -y
# install the packages # install the packages
dnf install -y sudo rsync tar nano htop iperf3 bind-utils unzip bzip2 nfs-utils git wget net-tools make dnf-automatic realmd oddjob oddjob-mkhomedir sssd adcli mlocate ncdu wireguard clevis dnf install -y sudo rsync tar nano htop iperf3 bind-utils unzip bzip2 nfs-utils git wget net-tools make dnf-automatic realmd oddjob oddjob-mkhomedir sssd adcli ncdu wireguard clevis jq
# enable automatic updates # enable automatic updates
sed --in-place "s/^apply_updates\ =\ no/apply_updates\ =\ yes/" /etc/dnf/automatic.conf sed --in-place "s/^apply_updates\ =\ no/apply_updates\ =\ yes/" /etc/dnf/automatic.conf
@@ -142,6 +149,15 @@ elif [ "${OS}" == "CentOS" ] || [ "${OS}" == "Rocky" ]; then
if [ "${KVM}" == "true" ]; then if [ "${KVM}" == "true" ]; then
dnf install -y qemu-guest-agent dnf install -y qemu-guest-agent
fi fi
# FastFetch install
#FASTFETCH_FILENAME="fastfetch-linux-amd64.deb"
# download srouce code of latest releases page
FASTFETCH_RELEASES_API=$(wget -O - https://api.github.com/repos/fastfetch-cli/fastfetch/releases/latest)
DOWNLOAD_URL=$(echo ${FASTFETCH_RELEASES_API} | jq -r '.assets[].browser_download_url | select(. | endswith("fastfetch-linux-amd64.rpm"))')
wget -P /tmp ${DOWNLOAD_URL}
dnf install -y /tmp/fastfetch-linux-amd64.rpm
fi fi
# modify ssh to allow root login and then restart the service # modify ssh to allow root login and then restart the service
@@ -171,17 +187,5 @@ else
git clone https://git.johnhgaunt.com/jgaunt/homelab-scripts git clone https://git.johnhgaunt.com/jgaunt/homelab-scripts
fi fi
# install neofetch
if [ -d /opt/neofetch ]; then
cd /opt/neofetch
git pull --ff-only
make install
else
cd /opt
git clone https://github.com/dylanaraps/neofetch
cd /opt/neofetch
make install
fi
# go to home directory # go to home directory
cd ~ cd ~