From 6216f8b0913f15a2ee86803dc53ae198c967d385 Mon Sep 17 00:00:00 2001 From: John Gaunt Date: Sat, 6 Sep 2025 23:54:46 +0000 Subject: [PATCH 1/5] Update to include fastfetch and remove neofetch --- update.sh | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/update.sh b/update.sh index 2290533..2d0035c 100644 --- a/update.sh +++ b/update.sh @@ -39,6 +39,10 @@ cat < /etc/profile.d/gaunt_custom_bash.sh export HISTTIMEFORMAT="%F %T " EOF +# fastfetch +# download srouce code of latest releases page +FASTFETCH_RELEASES_API=$(wget -O - https://api.github.com/repos/fastfetch-cli/fastfetch/releases/latest) + # Debian OS if [ ${OS} == "Debian" ] || [ ${OS} == "Ubuntu" ]; then @@ -67,6 +71,11 @@ if [ ${OS} == "Debian" ] || [ ${OS} == "Ubuntu" ]; then apt install -y qemu-guest-agent fi + # FastFetch install + #FASTFETCH_FILENAME="fastfetch-linux-amd64.deb" + 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 apt autoremove -y @@ -147,6 +156,13 @@ elif [ "${OS}" == "CentOS" ] || [ "${OS}" == "Rocky" ]; then if [ "${KVM}" == "true" ]; then dnf install -y qemu-guest-agent fi + + # FastFetch install + #FASTFETCH_FILENAME="fastfetch-linux-amd64.deb" + 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 # modify ssh to allow root login and then restart the service @@ -176,17 +192,5 @@ else git clone https://git.johnhgaunt.com/jgaunt/homelab-scripts 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 cd ~ From 647dbbb5949f64c7a46ea15cf97926b279876731 Mon Sep 17 00:00:00 2001 From: John Gaunt Date: Sat, 6 Sep 2025 23:57:04 +0000 Subject: [PATCH 2/5] updated variable name --- CyberChef Update Script.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CyberChef Update Script.sh b/CyberChef Update Script.sh index a1a59c9..e7cf5d4 100644 --- a/CyberChef Update Script.sh +++ b/CyberChef Update Script.sh @@ -3,13 +3,13 @@ # CyberChef web directory CYBERCHEF_DIRECTORY="/var/www/public/cyberchef" # 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=$(echo ${HTML_SOURCE} | jq -r .tag_name) +VERSION=$(echo ${CYBERCHEF_RELEASES_API} | jq -r .tag_name) # 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 -FILENAME=$(echo ${HTML_SOURCE} | jq -r .assets[].name) +FILENAME=$(echo ${CYBERCHEF_RELEASES_API} | jq -r .assets[].name) # test if version is already downloaded if [ $(ls ${CYBERCHEF_DIRECTORY}/*${VERSION}* | wc -l) -gt 0 ]; then From a9147a2afc7c369aa71e52fd4974cb56b8b46b85 Mon Sep 17 00:00:00 2001 From: jgaunt Date: Thu, 11 Sep 2025 00:49:59 +0000 Subject: [PATCH 3/5] Removed mlocate --- update.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/update.sh b/update.sh index 2d0035c..a7cbd78 100644 --- a/update.sh +++ b/update.sh @@ -53,7 +53,7 @@ if [ ${OS} == "Debian" ] || [ ${OS} == "Ubuntu" ]; then apt update; apt upgrade -y # 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 # enable unattended-upgrades echo unattended-upgrades unattended-upgrades/enable_auto_updates boolean true | debconf-set-selections @@ -105,7 +105,7 @@ elif [ "${OS}" == "CentOS" ] || [ "${OS}" == "Rocky" ]; then yum autoremove -y # 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 # install vm tools if [ "${VM}" == "true" ]; then @@ -143,7 +143,7 @@ elif [ "${OS}" == "CentOS" ] || [ "${OS}" == "Rocky" ]; then dnf autoremove -y # 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 # enable automatic updates sed --in-place "s/^apply_updates\ =\ no/apply_updates\ =\ yes/" /etc/dnf/automatic.conf From 96e30ae5d8329384f33a04bebf683cf80ca42fa6 Mon Sep 17 00:00:00 2001 From: John Gaunt Date: Fri, 12 Sep 2025 02:08:22 +0000 Subject: [PATCH 4/5] moved fastfetch after the wget install --- update.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/update.sh b/update.sh index 2d0035c..a32ed5f 100644 --- a/update.sh +++ b/update.sh @@ -39,10 +39,6 @@ cat < /etc/profile.d/gaunt_custom_bash.sh export HISTTIMEFORMAT="%F %T " EOF -# fastfetch -# download srouce code of latest releases page -FASTFETCH_RELEASES_API=$(wget -O - https://api.github.com/repos/fastfetch-cli/fastfetch/releases/latest) - # Debian OS if [ ${OS} == "Debian" ] || [ ${OS} == "Ubuntu" ]; then @@ -73,6 +69,8 @@ if [ ${OS} == "Debian" ] || [ ${OS} == "Ubuntu" ]; then # 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 @@ -159,6 +157,8 @@ elif [ "${OS}" == "CentOS" ] || [ "${OS}" == "Rocky" ]; then # 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 From 9222cd8cd398112e4e499aaf351024089f7197af Mon Sep 17 00:00:00 2001 From: jgaunt Date: Sun, 21 Sep 2025 04:29:59 +0000 Subject: [PATCH 5/5] Added jq to installed utils --- update.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/update.sh b/update.sh index de87b24..096d93a 100644 --- a/update.sh +++ b/update.sh @@ -49,7 +49,7 @@ if [ ${OS} == "Debian" ] || [ ${OS} == "Ubuntu" ]; then apt update; apt upgrade -y # 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 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 echo unattended-upgrades unattended-upgrades/enable_auto_updates boolean true | debconf-set-selections @@ -103,7 +103,7 @@ elif [ "${OS}" == "CentOS" ] || [ "${OS}" == "Rocky" ]; then yum autoremove -y # 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 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 if [ "${VM}" == "true" ]; then @@ -141,7 +141,7 @@ elif [ "${OS}" == "CentOS" ] || [ "${OS}" == "Rocky" ]; then dnf autoremove -y # 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 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 sed --in-place "s/^apply_updates\ =\ no/apply_updates\ =\ yes/" /etc/dnf/automatic.conf