Merge pull request #89 from wickedyoda/macos-update

Macos update
This commit is contained in:
WickedYoda authored and GitHub committed 2026-08-05 13:20:24 -05:00
commit 1e25e36ce6
195 files changed
+152301

No files matched your search

+44
View File
@@ -0,0 +1,44 @@
<<<<<<< HEAD
# updates_scripts
## Purpose
This directory contains files related to **updates scripts**.
## Contents
- `updates.py`
- `kali-updates.sh`
- `updates.sh`
## Usage
- Review each script or configuration file before running
- Some scripts may require **root or sudo**
- Paths and variables may need adjustment for your environment
## Notes
- This folder is part of the **public-setupfiles** repository
- Files are provided as-is for reference or automation
## Safety
Always back up data before running scripts that modify system state.
=======
# updates_scripts
## Overview
This directory is part of the **public-setupfiles** repository.
It contains scripts, configuration files, or resources related to **updates_scripts**.
## Usage
- Review scripts before execution
- Some files may require **root or sudo privileges**
- Paths, variables, or credentials may need customization
## Logging & Output
Scripts may generate logs or output files in the same directory or system locations.
## Safety Notes
- Always back up important data before running scripts
- Test in a non-production environment when possible
- Use at your own risk
---
>>>>>>> main
+43
View File
@@ -0,0 +1,43 @@
# /bin/bash
# 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
ID=$(grep -oP '(?<=^ID=).+' /etc/os-release)
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"
echo "deb http://archive.ubuntu.com/ubuntu/ Minotaur restricted universe multiverse" | sudo tee /etc/apt/sources.list
echo "deb http://archive.ubuntu.com/ubuntu/ Minotaur main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list
echo "deb http://archive.ubuntu.com/ubuntu/ Minotaur main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list
echo "deb http://security.ubuntu.com/ubuntu Minotaur 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!"
@@ -0,0 +1,23 @@
docker run -d \
--name netdata \
--hostname docker3 \
--pid host \
--network host \
--restart unless-stopped \
--cap-add SYS_PTRACE \
--cap-add SYS_ADMIN \
--security-opt apparmor=unconfined \
-v /root/docker/netdata/config:/etc/netdata \
-v /root/docker/netdata/lib:/var/lib/netdata \
-v /root/docker/netdata/cache:/var/cache/netdata \
-v /:/host/root:ro,rslave \
-v /etc/passwd:/host/etc/passwd:ro \
-v /etc/group:/host/etc/group:ro \
-v /etc/localtime:/etc/localtime:ro \
-v /proc:/host/proc:ro \
-v /sys:/host/sys:ro \
-v /etc/os-release:/host/etc/os-release:ro \
-v /var/log:/host/var/log:ro \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /run/dbus:/run/dbus:ro \
netdata/netdata
+48
View File
@@ -0,0 +1,48 @@
#!/usr/bin/env bash
set -euo pipefail
echo "==> Fixing APT repository keys and stale indexes on Debian Bookworm"
# Make sure basic tools exist
sudo apt-get update
sudo apt-get install -y ca-certificates curl gpg
# Create keyring directory if missing
sudo mkdir -p /etc/apt/keyrings
echo "==> Fixing InfluxData repo key"
curl --silent --location -o /tmp/influxdata-archive.key https://repos.influxdata.com/influxdata-archive.key
# Verify official InfluxData fingerprint before installing key
gpg --show-keys --with-fingerprint --with-colons /tmp/influxdata-archive.key 2>&1 \
| grep -q '^fpr:\+24C975CBA61A024EE1B631787C3D57159FC2F927:$'
gpg --dearmor < /tmp/influxdata-archive.key | sudo tee /etc/apt/keyrings/influxdata-archive.gpg >/dev/null
echo "deb [signed-by=/etc/apt/keyrings/influxdata-archive.gpg] https://repos.influxdata.com/debian stable main" \
| sudo tee /etc/apt/sources.list.d/influxdata.list >/dev/null
echo "==> Fixing Sury PHP repo key"
curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
sudo dpkg -i /tmp/debsuryorg-archive-keyring.deb
echo "deb [signed-by=/usr/share/keyrings/debsuryorg-archive-keyring.gpg] https://packages.sury.org/php/ bookworm main" \
| sudo tee /etc/apt/sources.list.d/php.list >/dev/null
echo "==> Cleaning stale APT metadata"
sudo rm -f /var/lib/apt/lists/*InRelease /var/lib/apt/lists/*Release /var/lib/apt/lists/*Packages
sudo apt-get clean
echo "==> Rebuilding package lists"
sudo apt-get update
echo "==> Repairing any partial package state"
sudo dpkg --configure -a
sudo apt-get install -f -y
echo "==> Running full upgrade"
sudo apt-get upgrade -y
sudo apt-get full-upgrade -y
sudo apt-get autoremove -y
echo "==> Done"
+110
View File
@@ -0,0 +1,110 @@
#!/bin/bash
set -euo pipefail
SUDO=""
if [[ $EUID -ne 0 ]]; then
if command -v sudo >/dev/null 2>&1; then
SUDO="sudo "
else
echo "This script must be run as root or have sudo installed."
exit 1
fi
fi
${SUDO}apt update
${SUDO}apt upgrade -y
${SUDO}apt full-upgrade -y
declare -A TOOL_MAP=(
[1]=kali-tools-identify
[2]=kali-tools-protect
[3]=kali-tools-detect
[4]=kali-tools-respond
[5]=kali-tools-recover
)
add_packages() {
local pkg
for pkg in "$@"; do
if [[ -z "${PACKAGE_SEEN[$pkg]:-}" ]]; then
INSTALL_PKGS+=("$pkg")
PACKAGE_SEEN[$pkg]=1
fi
done
}
INSTALL_PKGS=()
declare -A PACKAGE_SEEN=()
echo
echo "Select Kali tool categories to install (comma-separated numbers, or 'all'):"
echo " 1) Identify -> kali-tools-identify"
echo " 2) Protect -> kali-tools-protect"
echo " 3) Detect -> kali-tools-detect"
echo " 4) Respond -> kali-tools-respond"
echo " 5) Recover -> kali-tools-recover"
echo " Enter numbers (e.g. 1,3), 'all' or 'a' to install all. Leave empty to skip."
read -r -p "Selection: " selection
selection="${selection,,}"
selection="${selection//[[:space:]]/}"
if [[ -z "$selection" ]]; then
echo "No tools selected. Skipping Kali tool installation."
elif [[ "$selection" == "all" || "$selection" == "a" ]]; then
add_packages "${TOOL_MAP[@]}"
else
IFS=',' read -ra choices <<< "$selection"
for c in "${choices[@]}"; do
if [[ "$c" == "all" || "$c" == "a" ]]; then
add_packages "${TOOL_MAP[@]}"
break
elif [[ -n "${TOOL_MAP[$c]:-}" ]]; then
add_packages "${TOOL_MAP[$c]}"
else
echo "Warning: invalid choice '$c' ignored."
fi
done
fi
echo
echo "Kali Purple installation options:"
echo " 1) Kali Purple tools (identify/protect/detect/respond/recover)"
echo " 2) Kali Purple experience (kali-themes-purple, kali-menu, kali-wallpapers-legacy)"
echo " 3) All Kali Purple options"
echo " 4) Continue without Kali Purple installation"
read -r -p "Selection [4]: " purple_selection
purple_selection="${purple_selection,,}"
purple_selection="${purple_selection//[[:space:]]/}"
case "$purple_selection" in
1)
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
;;
""|4|skip)
echo "Skipping Kali Purple installation."
;;
*)
echo "Unrecognized choice. Skipping Kali Purple installation."
;;
esac
if [[ ${#INSTALL_PKGS[@]} -gt 0 ]]; then
echo "Installing selected packages: ${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
echo "System update and cleanup complete!"
+25
View File
@@ -0,0 +1,25 @@
#!/usr/bin/env python3
import subprocess
# Run 'sudo apt update'
subprocess.run(['sudo', 'apt', 'update'])
# Run 'sudo apt upgrade -y'
subprocess.run(['sudo', 'apt', 'upgrade', '-y'])
# Run 'sudo apt full-upgrade -y'
subprocess.run(['sudo', 'apt', 'full-upgrade', '-y'])
# Run 'sudo apt dist-upgrade -y'
subprocess.run(['sudo', 'apt', 'dist-upgrade', '-y'])
# Run 'sudo apt autoremove -y'
subprocess.run(['sudo', 'apt', 'autoremove', '-y'])
# Run 'sudo apt clean -y'
subprocess.run(['sudo', 'apt', 'clean', '-y'])
# Run 'sudo apt purge -y'
subprocess.run(['sudo', 'apt', 'purge', '-y'])
+9
View File
@@ -0,0 +1,9 @@
sudo ./fix_apt_influx.sh
sudo apt update
sudo apt upgrade -y
sudo apt full-upgrade -y
sudo apt autoremove -y
sudo apt clean -y
sudo apt purge -y
echo "System update and cleanup complete!"