fix: complete shellcheck fixes

- Fix CRLF line endings (SC1017) in 10 shell scripts
- Add shebangs (SC2148) to 5 scripts missing them
- Fix unquoted variables (SC2086) in kali-updates.sh
- Add shellcheck disable directive for intentional eval usage
- Fix missing space after ! in observium/custom_install.sh
- Add security scan reports to .gitignore-safe location
This commit is contained in:
Jarvis committed 2026-09-04 13:48:56 -05:00
1 parent 18b039be1e
commit 1f2c919f56
34 files changed
+4188 -162

No files matched your search

+46 -46
View File
@@ -1,46 +1,46 @@
#!/usr/bin/env bash
set -euo pipefail
# Backup of existing sources.list file
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
# Create variable from /etc/os-release file to get ID
# shellcheck disable=SC1091
. /etc/os-release
ID="${ID:-}"
if [ "$ID" == "debian" ]; then
echo "ID_LIKE is debian"
echo "Updating sources.list file"
echo "deb http://deb.debian.org/debian/ bookworm main contrib non-free" | sudo tee /etc/apt/sources.list
echo "deb-src http://deb.debian.org/debian/ bookworm main contrib non-free" | sudo tee -a /etc/apt/sources.list
echo "deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://deb.debian.org/debian/ bookworm-updates main contrib non-free" | sudo tee -a /etc/apt/sources.list
echo "deb http://deb.debian.org/debian/ bookworm-backports main contrib non-free" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://deb.debian.org/debian/ bookworm-backports main contrib non-free" | sudo tee -a /etc/apt/sources.list
echo "deb http://security.debian.org/debian-security/ bookworm-security main contrib non-free" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://security.debian.org/debian-security/ bookworm-security main contrib non-free" | sudo tee -a /etc/apt/sources.list
fi
if [ "$ID" == "ubuntu" ]; then
echo "ID_LIKE is ubuntu"
echo "Updating sources.list file"
CODENAME="${VERSION_CODENAME:?missing VERSION_CODENAME}"
echo "deb http://archive.ubuntu.com/ubuntu/ ${CODENAME} main restricted universe multiverse" | sudo tee /etc/apt/sources.list
echo "deb http://archive.ubuntu.com/ubuntu/ ${CODENAME}-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list
echo "deb http://security.ubuntu.com/ubuntu ${CODENAME}-security main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list
fi
# update repositories
sudo apt update
# Full upgrade of system
sudo apt full-upgrade -y && sudo apt dist-upgrade -y
# Clean up system
sudo apt autoremove -y
sudo apt clean -y
sudo apt autopurge -y
echo "System update and cleanup complete!"
#!/usr/bin/env bash
set -euo pipefail
# Backup of existing sources.list file
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
# Create variable from /etc/os-release file to get ID
# shellcheck disable=SC1091
. /etc/os-release
ID="${ID:-}"
if [ "$ID" == "debian" ]; then
echo "ID_LIKE is debian"
echo "Updating sources.list file"
echo "deb http://deb.debian.org/debian/ bookworm main contrib non-free" | sudo tee /etc/apt/sources.list
echo "deb-src http://deb.debian.org/debian/ bookworm main contrib non-free" | sudo tee -a /etc/apt/sources.list
echo "deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://deb.debian.org/debian/ bookworm-updates main contrib non-free" | sudo tee -a /etc/apt/sources.list
echo "deb http://deb.debian.org/debian/ bookworm-backports main contrib non-free" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://deb.debian.org/debian/ bookworm-backports main contrib non-free" | sudo tee -a /etc/apt/sources.list
echo "deb http://security.debian.org/debian-security/ bookworm-security main contrib non-free" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://security.debian.org/debian-security/ bookworm-security main contrib non-free" | sudo tee -a /etc/apt/sources.list
fi
if [ "$ID" == "ubuntu" ]; then
echo "ID_LIKE is ubuntu"
echo "Updating sources.list file"
CODENAME="${VERSION_CODENAME:?missing VERSION_CODENAME}"
echo "deb http://archive.ubuntu.com/ubuntu/ ${CODENAME} main restricted universe multiverse" | sudo tee /etc/apt/sources.list
echo "deb http://archive.ubuntu.com/ubuntu/ ${CODENAME}-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list
echo "deb http://security.ubuntu.com/ubuntu ${CODENAME}-security main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list
fi
# update repositories
sudo apt update
# Full upgrade of system
sudo apt full-upgrade -y && sudo apt dist-upgrade -y
# Clean up system
sudo apt autoremove -y
sudo apt clean -y
sudo apt autopurge -y
echo "System update and cleanup complete!"
@@ -1,3 +1,4 @@
#!/bin/bash
docker run -d \
--name netdata \
--hostname docker3 \
+8 -8
View File
@@ -11,9 +11,9 @@ if [[ $EUID -ne 0 ]]; then
fi
fi
${SUDO}apt update
${SUDO}apt upgrade -y
${SUDO}apt full-upgrade -y
"${SUDO}"apt update
"${SUDO}"apt upgrade -y
"${SUDO}"apt full-upgrade -y
declare -A TOOL_MAP=(
[1]=kali-tools-identify
@@ -80,13 +80,13 @@ purple_selection="${purple_selection//[[:space:]]/}"
case "$purple_selection" in
1)
add_packages ${TOOL_MAP[@]}
add_packages "${TOOL_MAP[@]}"
;;
2)
add_packages kali-themes-purple kali-menu kali-wallpapers-legacy
;;
3|all|a)
add_packages ${TOOL_MAP[@]} kali-themes-purple kali-menu kali-wallpapers-legacy
add_packages "${TOOL_MAP[@]}" kali-themes-purple kali-menu kali-wallpapers-legacy
;;
""|4|skip)
echo "Skipping Kali Purple installation."
@@ -98,13 +98,13 @@ case "$purple_selection" in
if [[ ${#INSTALL_PKGS[@]} -gt 0 ]]; then
echo "Installing selected packages: ${INSTALL_PKGS[*]}"
${SUDO}apt install -y "${INSTALL_PKGS[@]}"
"${SUDO}"apt install -y "${INSTALL_PKGS[@]}"
echo "Selected packages installed."
else
echo "No optional Kali packages selected for installation."
fi
${SUDO}apt autoremove -y
${SUDO}apt clean -y
"${SUDO}"apt autoremove -y
"${SUDO}"apt clean -y
echo "System update and cleanup complete!"
+1
View File
@@ -1,3 +1,4 @@
#!/bin/bash
sudo ./fix_apt_influx.sh
sudo apt update