Reorganize repository structure and refresh READMEs

This commit is contained in:
WickedYoda committed 2026-04-08 14:57:07 -05:00
1 parent 2270530d9e
commit a8b7ccbf2a
170 files changed
+616 -1391

No files matched your search

@@ -0,0 +1,31 @@
sudo apt install -y nmap \
wordlist \
ettercap-common \
ettercap-graphical \
arp-scan \
wfuzz \
wireshark \
airgeddon \
aircrack-ng \
airgraph-ng \
traceroute \
wifite wpscan \
whois \
wifiphisher \
kismet \
netdiscover \
bettercap \
burpsuite \
tcpdump \
fern-wifi-cracker \
bettercap-ui \
wifi-honey \
gparted \
gvm \
openvas \
git
git clone https://github.com/LionSec/katoolin.git && cp katoolin/katoolin.py /usr/bin/katoolin
chmod +x /usr/bin/katoolin
# sudo katoolin
@@ -0,0 +1,14 @@
# Kali_tools_install
## Overview
Scripts for installing Kali tooling on compatible Debian-based systems.
## Contents
- `Kalitoolsinstall.sh`
- `setup_debian_kali_tools.sh`
## Usage
Use these scripts when you want a targeted Kali toolset without fully converting the base operating system.
## Notes
Package availability and repository choices should be reviewed before execution.
@@ -0,0 +1,58 @@
#!/bin/bash
# Ensure the script is run as root
if [ "$(id -u)" -ne 0 ]; then
echo "Please run this script as root."
exit 1
fi
# Backup the current sources.list
cp /etc/apt/sources.list /etc/apt/sources.list.bak
echo "Backup of sources.list created at /etc/apt/sources.list.bak"
# Add Kali rolling repository
echo "deb http://http.kali.org/kali kali-rolling main contrib non-free" | tee -a /etc/apt/sources.list
echo "Kali repository added."
# Import Kali's GPG key
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys ED444FF07D8D0BF6
echo "Kali GPG key imported."
# Update package lists
apt update
# Prompt user to select a Kali metapackage to install
echo "Select a Kali metapackage to install:"
echo "1) kali-linux-top10"
echo "2) kali-linux-default"
echo "3) kali-linux-all"
echo "4) kali-linux-wireless"
echo "5) kali-linux-web"
read -p "Enter the number corresponding to your choice: " choice
case $choice in
1)
apt install -y kali-linux-top10
;;
2)
apt install -y kali-linux-default
;;
3)
apt install -y kali-linux-all
;;
4)
apt install -y kali-linux-wireless
;;
5)
apt install -y kali-linux-web
;;
*)
echo "Invalid choice. Exiting."
exit 1
;;
esac
echo "Installation of the selected Kali metapackage is complete."
# Reminder to remove Kali repositories after installation
echo "It's recommended to remove the Kali repository from /etc/apt/sources.list after installation to prevent potential system issues."
+23
View File
@@ -0,0 +1,23 @@
# platform_setup
## Overview
This category groups platform-specific installation and setup scripts for Linux distributions, Raspberry Pi, macOS, OpenWrt, Cockpit, and Paperless-ngx.
## Contents
- `Kali_tools_install`
- `cockpit`
- `debian-dist-upgrades`
- `debian-files`
- `kali-purple`
- `mac-scripts`
- `openwrt_scripts`
- `paperless-ngx`
- `raspberrypi`
- `server_config`
- `ubuntu-based`
## Usage
Use the subfolder that matches the target platform or service and review prerequisites before execution.
## Notes
Many scripts here install packages or change host configuration, so they should be tested on non-production systems first.
+13
View File
@@ -0,0 +1,13 @@
# cockpit
## Overview
Cockpit installation helper scripts for setting up the web administration interface.
## Contents
- `cockpit_install.sh`
## Usage
Run these scripts on systems where Cockpit should be installed and exposed.
## Notes
Review firewall and authentication expectations before enabling a web management surface.
@@ -0,0 +1 @@
sudo apt -y install cockpit
@@ -0,0 +1,13 @@
# debian-dist-upgrades
## Overview
Helpers for performing Debian distribution upgrade workflows.
## Contents
- `dist-upgrade.sh`
## Usage
Use these scripts when preparing a Debian host for a version upgrade.
## Notes
Major OS upgrades can be disruptive, so validate backups and package sources first.
@@ -0,0 +1,179 @@
#!/bin/bash
set -o pipefail
LOGFILE="./log.txt"
exec > >(tee -a "$LOGFILE") 2>&1
echo "===== Debian Upgrade Script Started: $(date) ====="
# --------------------------------------------------
# Helper: yes/no prompt (accepts y|yes / n|no)
# --------------------------------------------------
ask_yes_no() {
local prompt="$1"
local reply
while true; do
read -rp "$prompt [y/n]: " reply
case "${reply,,}" in
y|yes) return 0 ;;
n|no) return 1 ;;
*) echo "Please answer yes or no." ;;
esac
done
}
# --------------------------------------------------
# 1. Verify Debian-based OS
# --------------------------------------------------
if [[ ! -f /etc/os-release ]]; then
echo "ERROR: Cannot detect OS."
exit 1
fi
source /etc/os-release
if [[ "$ID_LIKE" != *"debian"* && "$ID" != "debian" ]]; then
echo "ERROR: This system is not Debian-based."
exit 1
fi
echo "Detected OS: $PRETTY_NAME"
# --------------------------------------------------
# 2. Identify version and prompt
# --------------------------------------------------
DEBIAN_VERSION="$VERSION_ID"
DEBIAN_CODENAME="$VERSION_CODENAME"
echo "Current Debian Version: $DEBIAN_VERSION ($DEBIAN_CODENAME)"
ask_yes_no "Continue?" || exit 0
# --------------------------------------------------
# 3. Upgrade Menu
# --------------------------------------------------
echo ""
echo "Select upgrade option:"
echo "1) apt upgrade"
echo "2) apt full-upgrade"
echo "3) Debian distro upgrade"
echo "4) Convert Debian to Parrot Linux"
read -rp "Choice [1-4]: " CHOICE
# Non-interactive + keep config files
export DEBIAN_FRONTEND=noninteractive
APT_OPTS=(
"-o" "Dpkg::Options::=--force-confold"
"-o" "Dpkg::Options::=--force-confdef"
)
# --------------------------------------------------
# Option 1: apt upgrade
# --------------------------------------------------
if [[ "$CHOICE" == "1" ]]; then
apt update
apt upgrade -y "${APT_OPTS[@]}"
apt autoremove -y
echo "apt upgrade completed."
exit 0
fi
# --------------------------------------------------
# Option 2: apt full-upgrade
# --------------------------------------------------
if [[ "$CHOICE" == "2" ]]; then
apt update
apt upgrade -y "${APT_OPTS[@]}"
apt full-upgrade -y "${APT_OPTS[@]}"
apt autoremove -y
echo "apt full-upgrade completed."
exit 0
fi
# --------------------------------------------------
# Option 4: Parrot Linux Conversion
# --------------------------------------------------
if [[ "$CHOICE" == "4" ]]; then
echo "WARNING: This will convert Debian into Parrot Linux."
ask_yes_no "Are you sure you want to proceed?" || exit 1
git clone https://gitlab.com/parrotsec/project/debian-conversion-script.git
cd debian-conversion-script || exit 1
chmod +x ./install.sh
./install.sh
exit $?
fi
# --------------------------------------------------
# Option 3: Debian Distro Upgrade
# --------------------------------------------------
if [[ "$CHOICE" != "3" ]]; then
echo "Invalid selection."
exit 1
fi
echo ""
echo "Select Debian upgrade target:"
echo "1) Debian 12 (Bookworm - Stable)"
echo "2) Debian 13 (Trixie - Testing)"
read -rp "Choice [1-2]: " TARGET
# Backup sources.list
cp /etc/apt/sources.list /etc/apt/sources.list.bak.$(date +%F)
# Comment out existing entries (do not delete)
sed -i 's/^[^#]/#&/' /etc/apt/sources.list
# --------------------------------------------------
# Debian 12
# --------------------------------------------------
if [[ "$TARGET" == "1" ]]; then
echo "Preparing upgrade to Debian 12 (Bookworm)"
cat <<EOF >> /etc/apt/sources.list
# Debian 12 Bookworm Repositories
deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
EOF
apt update
apt upgrade -y "${APT_OPTS[@]}"
apt full-upgrade -y "${APT_OPTS[@]}"
apt autoremove -y
echo "Upgrade to Debian 12 completed."
exit 0
fi
# --------------------------------------------------
# Debian 13 (Double Confirmation)
# --------------------------------------------------
if [[ "$TARGET" == "2" ]]; then
echo "WARNING: Debian 13 (Trixie) is TESTING."
ask_yes_no "Do you understand this is a testing release?" || exit 1
ask_yes_no "Confirm upgrade to Debian 13?" || exit 1
cat <<EOF >> /etc/apt/sources.list
# Debian 13 Trixie Repositories
deb http://deb.debian.org/debian trixie main contrib non-free non-free-firmware
deb http://deb.debian.org/debian trixie-updates main contrib non-free non-free-firmware
deb http://security.debian.org/debian-security trixie-security main contrib non-free non-free-firmware
EOF
apt update
apt upgrade -y "${APT_OPTS[@]}"
apt full-upgrade -y "${APT_OPTS[@]}"
apt autoremove -y
apt clean
apt purge -y '~c'
echo "Upgrade to Debian 13 completed."
exit 0
fi
echo "Unknown error occurred."
exit 1
+14
View File
@@ -0,0 +1,14 @@
# debian-files
## Overview
General Debian setup and utility scripts such as package helpers and service update routines.
## Contents
- `install-bashtop.sh`
- `update_tailscale.sh`
## Usage
Use these scripts on Debian-based hosts after checking package names and system assumptions.
## Notes
Some scripts here are intended for recurring maintenance rather than one-time bootstrap tasks.
@@ -0,0 +1,4 @@
git clone https://github.com/aristocratos/bashtop.git
cd bashtop
sudo apt install -y make
sudo make install
@@ -0,0 +1,145 @@
#!/usr/bin/env bash
set -euo pipefail
# Update Tailscale on Debian/Ubuntu/Raspbian.
# - Ensures official repo is present (with signed-by keyring for modern releases)
# - apt-get update && apt-get install -y tailscale
# - Starts/enables tailscaled if systemd is available
REPO_FILE="/etc/apt/sources.list.d/tailscale.list"
KEYRING_DIR="/usr/share/keyrings"
KEYRING_FILE="${KEYRING_DIR}/tailscale-archive-keyring.gpg"
need_cmd() {
command -v "$1" >/dev/null 2>&1 || {
echo "Installing missing dependency: $1"
sudo apt-get update -y
sudo apt-get install -y "$1"
}
}
require_root() {
if [ "$EUID" -ne 0 ]; then
echo "Please run as root (use: sudo bash $0)"
exit 1
fi
}
main() {
require_root
# Base dependencies
need_cmd curl
need_cmd tee
need_cmd apt-get
# Detect distro and codename
if [ -r /etc/os-release ]; then
. /etc/os-release
else
echo "Cannot read /etc/os-release; aborting."
exit 1
fi
# Normalize ID to expected repo path segments
# (tailscale supports 'debian', 'ubuntu', 'raspbian')
case "${ID:-}" in
debian) repo_base="debian" ;;
ubuntu) repo_base="ubuntu" ;;
raspbian) repo_base="raspbian" ;;
*)
# Some derivatives set ID_LIKE
if [[ "${ID_LIKE:-}" =~ debian ]]; then
# Default to debian rules for derivatives
repo_base="debian"
else
echo "Unsupported distro ID: '${ID:-}' (ID_LIKE: '${ID_LIKE:-}')."
echo "This script supports Debian, Ubuntu, or Raspbian."
exit 1
fi
;;
esac
codename="${VERSION_CODENAME:-}"
if [ -z "$codename" ]; then
# Fallback: parse from /etc/debian_version if needed
if [ -r /etc/debian_version ] && [ "$repo_base" = "debian" ]; then
debver="$(cut -d'.' -f1 < /etc/debian_version || true)"
case "$debver" in
12) codename="bookworm" ;;
11) codename="bullseye" ;;
10) codename="buster" ;;
9) codename="stretch" ;;
esac
fi
fi
if [ -z "$codename" ]; then
echo "Could not detect VERSION_CODENAME. Aborting to avoid wrong repo."
exit 1
fi
echo "Detected: ID='${ID:-unknown}' (${repo_base}), CODENAME='${codename}'."
mkdir -p -m 0755 "$KEYRING_DIR"
# URLs per Tailscale official instructions
key_url="https://pkgs.tailscale.com/stable/${repo_base}/${codename}.noarmor.gpg"
list_url="https://pkgs.tailscale.com/stable/${repo_base}/${codename}.tailscale-keyring.list"
# Some older suites (e.g., buster/stretch) don't have *.noarmor.gpg + *.tailscale-keyring.list.
# In that case, fall back to legacy apt-key instructions.
use_legacy=false
if curl -fsI "$key_url" >/dev/null 2>&1 && curl -fsI "$list_url" >/dev/null 2>&1; then
echo "Using keyring-based repo for ${repo_base}/${codename}."
curl -fsSL "$key_url" | tee "$KEYRING_FILE" >/dev/null
chmod 0644 "$KEYRING_FILE"
curl -fsSL "$list_url" | tee "$REPO_FILE" >/dev/null
else
echo "Keyring URLs not available for ${repo_base}/${codename}. Falling back to legacy method."
use_legacy=true
fi
if [ "$use_legacy" = true ]; then
# Legacy (deprecated) apt-key method for older releases
# Keep this branch only for suites where keyring method isn't provided upstream.
asc_url="https://pkgs.tailscale.com/stable/${repo_base}/${codename}.asc"
list_legacy_url="https://pkgs.tailscale.com/stable/${repo_base}/${codename}.list"
if ! curl -fsI "$asc_url" >/dev/null 2>&1 || ! curl -fsI "$list_legacy_url" >/dev/null 2>&1; then
echo "No repo artifacts found for ${repo_base}/${codename}. Please upgrade your OS or install via https://tailscale.com/install.sh"
exit 1
fi
need_cmd apt-key
curl -fsSL "$asc_url" | apt-key add -
curl -fsSL "$list_legacy_url" | tee "$REPO_FILE" >/dev/null
fi
echo "Refreshing package lists…"
apt-get update -y
echo "Installing/upgrading tailscale…"
DEBIAN_FRONTEND=noninteractive apt-get install -y tailscale
# Start/enable service if systemd is available
if command -v systemctl >/dev/null 2>&1; then
systemctl enable --now tailscaled || true
fi
echo "Done. Tailscale version:"
tailscale version || true
cat <<'EOF'
If this device hasn't been authenticated yet, run:
sudo tailscale up
Common options:
sudo tailscale up --accept-routes --advertise-exit-node
sudo tailscale up --advertise-routes=10.0.0.0/16
EOF
}
main "$@"
+13
View File
@@ -0,0 +1,13 @@
# kali-purple
## Overview
Installer content for Kali Purple-related setup tasks.
## Contents
- `install_kali_purple.sh`
## Usage
Use this folder when provisioning or extending a Kali Purple environment.
## Notes
Security tooling installs can be large and may require repository or network access validation.
@@ -0,0 +1,32 @@
#!/bin/bash
# Make sure the script is run as root
if [[ $EUID -ne 0 ]]; then
echo "❌ This script must be run as root. Try: sudo $0"
exit 1
fi
echo "🔧 Updating Kali sources.list for rolling release..."
cat <<EOF > /etc/apt/sources.list
# See https://www.kali.org/docs/general-use/kali-linux-sources-list-repositories/
deb http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmware
# Additional line for source packages
# deb-src http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmware
EOF
echo "📦 Updating system packages..."
apt update && apt upgrade -y && apt autoremove -y
echo "🛡 Installing Kali Purple tools..."
apt install -y kali-tools-identify kali-tools-protect kali-tools-detect kali-tools-respond kali-tools-recover
echo "🎨 Installing Purple theme..."
apt install -y kali-themes-purple
echo "📂 Reinstalling Kali menu to apply changes..."
apt install --reinstall -y kali-menu
echo "🖼 Installing legacy wallpapers..."
apt install -y kali-wallpapers-legacy
echo "✅ Kali Purple setup complete!"
+16
View File
@@ -0,0 +1,16 @@
# mac-scripts
## Overview
macOS utility scripts for Finder behavior, rsync tasks, package maintenance, and related automation.
## Contents
- `brewscripts`
- `disable_DS_store.sh`
- `not working- download-sync.sh`
- `rsync basic.sh`
## Usage
Use the script that matches the macOS task you want to automate.
## Notes
macOS path, permission, and launch behavior can differ from Linux, so test each workflow locally first.
@@ -0,0 +1,13 @@
# brewscripts
## Overview
Homebrew maintenance helpers used from within the macOS scripts area.
## Contents
- `update-brew-packages.sh`
## Usage
Use these scripts when updating or maintaining Homebrew packages on macOS.
## Notes
Make sure Homebrew is installed and available in the expected shell environment first.
@@ -0,0 +1,141 @@
#!/bin/bash
set -u
# ---------- helpers ----------
cecho() { printf "%b%s%b\n" "\033[1;36m" "$1" "\033[0m"; } # cyan bold
wecho() { printf "%b%s%b\n" "\033[1;33m" "$1" "\033[0m"; } # yellow bold
eecho() { printf "%b%s%b\n" "\033[1;31m" "$1" "\033[0m"; } # red bold
gecho() { printf "%b%s%b\n" "\033[1;32m" "$1" "\033[0m"; } # green bold
# ---------- checks ----------
if ! command -v brew >/dev/null 2>&1; then
eecho "Homebrew not found. Install from https://brew.sh and re-run."
exit 1
fi
# ---------- gather installed casks ----------
cecho "Collecting installed casks..."
mapfile -t INSTALLED_CASKS < <(brew list --cask 2>/dev/null || true)
if [[ ${#INSTALLED_CASKS[@]} -eq 0 ]]; then
wecho "No casks installed. Nothing to do."
exit 0
fi
# ---------- detect deprecated/disabled ----------
cecho "Checking cask status (deprecated/disabled/discontinued)..."
DEPRECATED=()
for c in "${INSTALLED_CASKS[@]}"; do
# Brew prints status text in `brew info --cask`
INFO="$(brew info --cask "$c" 2>/dev/null || true)"
if echo "$INFO" | grep -qiE 'deprecated|disabled|discontinued'; then
DEPRECATED+=("$c")
fi
done
if [[ ${#DEPRECATED[@]} -eq 0 ]]; then
gecho "No deprecated or disabled casks detected. ✅"
exit 0
fi
wecho "Deprecated/disabled casks detected:"
for c in "${DEPRECATED[@]}"; do echo " - $c"; done
echo
# ---------- confirm removal ----------
read -r -p "Proceed to uninstall ALL of the above casks? [y/N] " ans
if [[ ! "$ans" =~ ^[Yy]$ ]]; then
wecho "Aborting uninstall by user choice."
exit 0
fi
# ---------- uninstall ----------
REMOVED=()
FAILED=()
for c in "${DEPRECATED[@]}"; do
cecho "Uninstalling $c ..."
if brew uninstall --cask "$c"; then
REMOVED+=("$c")
else
FAILED+=("$c")
fi
done
echo
gecho "Uninstall complete."
if [[ ${#REMOVED[@]} -gt 0 ]]; then
gecho "Successfully removed:"
for c in "${REMOVED[@]}"; do echo " - $c"; done
fi
if [[ ${#FAILED[@]} -gt 0 ]]; then
eecho "Failed to remove:"
for c in "${FAILED[@]}"; do echo " - $c"; done
fi
echo
# ---------- cleanup & autoremove ----------
cecho "Running cleanup..."
brew cleanup -s
brew autoremove || true
gecho "Cleanup done."
echo
# ---------- offer optional replacements ----------
# We’ll offer common replacements for known casks you had:
OFFER_GSTREAMER=false
OFFER_PWSH=false
for c in "${REMOVED[@]}"; do
case "$c" in
gstreamer-runtime|gstreamer-development)
OFFER_GSTREAMER=true
;;
powershell)
OFFER_PWSH=true
;;
esac
done
OPTIONS=()
[[ "$OFFER_GSTREAMER" == true ]] && OPTIONS+=("1) Install GStreamer via Homebrew (formula: gstreamer)")
[[ "$OFFER_GSTREAMER" == true ]] && OPTIONS+=("2) Open official GStreamer downloads page in browser")
[[ "$OFFER_PWSH" == true ]] && OPTIONS+=("3) Install PowerShell via Homebrew cask (stable)")
[[ "$OFFER_PWSH" == true ]] && OPTIONS+=("4) Open official PowerShell releases in browser")
if [[ ${#OPTIONS[@]} -gt 0 ]]; then
cecho "Optional replacements (enter numbers separated by spaces, or press Enter to skip):"
for opt in "${OPTIONS[@]}"; do echo " $opt"; done
read -r -p "Choice(s): " choices
echo
for choice in $choices; do
case "$choice" in
1)
cecho "Installing GStreamer (formula)..."
brew install gstreamer || eecho "Failed to install gstreamer."
;;
2)
cecho "Opening GStreamer downloads page..."
# Official downloads
open "https://gstreamer.freedesktop.org/download/"
;;
3)
cecho "Installing PowerShell (cask)..."
# Homebrew core cask usually handles latest stable
brew install --cask powershell || eecho "Failed to install PowerShell."
;;
4)
cecho "Opening PowerShell releases page..."
open "https://github.com/PowerShell/PowerShell/releases"
;;
*)
wecho "Unknown option: $choice (skipped)"
;;
esac
done
else
wecho "No known replacements to offer for removed casks."
fi
gecho "All set. 👍"
+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
echo "Disabling creation of .DS_Store on network drives..."
# Disable writing .DS_Store files on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE
sudo defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE
echo "Deleting existing .DS_Store files in home directory..."
sudo find ~ -name ".DS_Store" -delete
echo "Done. A reboot is required for changes to take effect."
@@ -0,0 +1 @@
rsync -r -v /Users/traver/Downloads/ traver@10.0.85.10:'/srv/dev-disk-by-uuid-c725afdf-5b01-4c4b-9e26-16d7abfced6b/public/downloads/Mac Downloads/Apps'
+56
View File
@@ -0,0 +1,56 @@
#!/bin/bash
# SMB share credentials
NAS_USERNAME="your_username"
NAS_PASSWORD="your_password"
NAS_ADDRESS="nas"
NAS_SHARE="mymedia"
# Local folders to sync
LOCAL_FOLDERS=(
"/path/to/your/folder1"
"/path/to/your/folder2"
)
# Mount point for the SMB share
MOUNT_POINT="/Volumes/mymedia"
# Ensure the mount point exists
if [ ! -d "$MOUNT_POINT" ]; then
mkdir -p "$MOUNT_POINT"
fi
# Mount the SMB share
echo "Mounting SMB share..."
mount -t smbfs "//$NAS_USERNAME:$NAS_PASSWORD@$NAS_ADDRESS/$NAS_SHARE" "$MOUNT_POINT"
if [ $? -ne 0 ]; then
echo "Failed to mount SMB share. Please check your credentials and network connection."
exit 1
fi
echo "SMB share mounted successfully at $MOUNT_POINT."
# Sync local folders to the SMB share
for LOCAL_FOLDER in "${LOCAL_FOLDERS[@]}"; do
BASENAME=$(basename "$LOCAL_FOLDER")
DESTINATION="$MOUNT_POINT/$BASENAME"
echo "Syncing $LOCAL_FOLDER to $DESTINATION..."
rsync -avh --progress "$LOCAL_FOLDER/" "$DESTINATION/"
if [ $? -ne 0 ]; then
echo "Failed to sync $LOCAL_FOLDER."
else
echo "Successfully synced $LOCAL_FOLDER."
fi
done
# Unmount the SMB share
echo "Unmounting SMB share..."
umount "$MOUNT_POINT"
if [ $? -ne 0 ]; then
echo "Failed to unmount SMB share. Please unmount it manually."
else
echo "SMB share unmounted successfully."
fi
echo "Sync operation completed."
+14
View File
@@ -0,0 +1,14 @@
# openwrt_scripts
## Overview
OpenWrt upgrade and package-install helpers.
## Contents
- `installing_ipref.sh`
- `openwrt_full-upgrade.sh`
## Usage
Use these scripts for router maintenance or OpenWrt package deployment.
## Notes
OpenWrt devices vary by storage and package support, so confirm compatibility before running upgrades.
@@ -0,0 +1,36 @@
#!/bin/sh
echo "[+] Updating package list..."
opkg update
echo "[+] Installing iperf3..."
opkg install iperf3
echo "[+] Creating init script..."
cat << 'EOF' > /etc/init.d/iperf3-server
#!/bin/sh /etc/rc.common
# Custom init script to run iperf3 server on boot
START=99
start() {
logger -t iperf3 "Starting iperf3 server on boot"
iperf3 -s -D
}
stop() {
logger -t iperf3 "Stopping iperf3 server"
killall iperf3
}
EOF
echo "[+] Making script executable..."
chmod +x /etc/init.d/iperf3-server
echo "[+] Enabling iperf3 to start at boot..."
/etc/init.d/iperf3-server enable
echo "[+] Starting iperf3 server now..."
/etc/init.d/iperf3-server start
echo "[✓] iperf3 is now running and will auto-start on boot."
@@ -0,0 +1,42 @@
#!/bin/sh
# Ensure the script is run as root
if [ "$(id -u)" -ne 0 ]; then
echo "This script must be run as root. Use sudo or run as root."
exit 1
fi
echo "Starting full OpenWRT upgrade using opkg..."
# Step 1: Update package lists
echo "Updating package lists..."
opkg update
# Step 2: List upgradable packages
echo "Listing upgradable packages..."
opkg list-upgradable
# Step 3: Upgrade all installed packages
echo "Upgrading installed packages..."
opkg list-upgradable | cut -f1 -d ' ' | xargs -r opkg upgrade
# Step 4: Remove unnecessary packages
echo "Removing unnecessary packages..."
opkg remove --autoremove
# Step 5: Clean package cache
echo "Cleaning up package cache..."
opkg clean
# Step 6: Restart the device (optional)
echo "Upgrade complete. A reboot is recommended."
read -p "Do you want to reboot now? (y/N): " REBOOT
if [ "$REBOOT" = "y" ] || [ "$REBOOT" = "Y" ]; then
echo "Rebooting..."
reboot
else
echo "Reboot skipped. You may need to restart manually."
fi
echo "OpenWRT full upgrade completed!"
+13
View File
@@ -0,0 +1,13 @@
# paperless-ngx
## Overview
Installation helpers for setting up Paperless-ngx.
## Contents
- `paperless-ngx-install.sh`
## Usage
Use this folder when deploying or documenting a Paperless-ngx installation.
## Notes
Paperless-ngx typically depends on containers or supporting services, so prepare the host accordingly.
@@ -0,0 +1,98 @@
#!/bin/bash
# Paperless-NGX Installer for Debian 12
# This script installs dependencies, configures the environment, and sets up Paperless-NGX.
set -e
echo "Updating and installing required dependencies..."
sudo apt update && sudo apt upgrade -y
sudo apt install -y python3 python3-pip python3-dev \
imagemagick fonts-liberation gnupg libpq-dev \
default-libmysqlclient-dev pkg-config libmagic-dev \
libzbar0 poppler-utils unpaper ghostscript \
icc-profiles-free qpdf liblept5 libxml2 pngquant \
zlib1g tesseract-ocr build-essential python3-setuptools \
python3-wheel mariadb-client redis-server
# Enable Redis and start it
echo "Configuring Redis..."
sudo systemctl enable redis
sudo systemctl start redis
# Create paperless system user
echo "Creating paperless user..."
sudo adduser paperless --system --home /opt/paperless --group
# Download and install Paperless-NGX
PAPERLESS_VERSION="v1.10.2"
PAPERLESS_URL="https://github.com/paperless-ngx/paperless-ngx/releases/download/${PAPERLESS_VERSION}/paperless-ngx-${PAPERLESS_VERSION}.tar.xz"
echo "Downloading Paperless-NGX ${PAPERLESS_VERSION}..."
cd /opt
sudo -u paperless curl -O -L $PAPERLESS_URL
sudo -u paperless tar -xf "paperless-ngx-${PAPERLESS_VERSION}.tar.xz"
sudo mv "paperless-ngx-${PAPERLESS_VERSION}" /opt/paperless
# Create necessary directories
echo "Creating directories..."
sudo mkdir -p /opt/paperless/media /opt/paperless/data /opt/paperless/consume
sudo chown paperless:paperless /opt/paperless/media /opt/paperless/data /opt/paperless/consume
# Configure Paperless
echo "Configuring Paperless..."
cat <<EOL | sudo tee /opt/paperless/paperless.conf
PAPERLESS_REDIS=redis://localhost:6379
PAPERLESS_DBENGINE=sqlite
PAPERLESS_CONSUMPTION_DIR=/opt/paperless/consume
PAPERLESS_DATA_DIR=/opt/paperless/data
PAPERLESS_MEDIA_ROOT=/opt/paperless/media
PAPERLESS_SECRET_KEY=$(openssl rand -base64 32)
PAPERLESS_OCR_LANGUAGE=eng
PAPERLESS_TIME_ZONE=$(cat /etc/timezone)
EOL
# Install Python dependencies
echo "Installing Python dependencies..."
cd /opt/paperless
sudo -u paperless pip3 install --upgrade pip
sudo -u paperless pip3 install -r requirements.txt
# Initialize Paperless database
echo "Initializing Paperless database..."
cd /opt/paperless/src
sudo -u paperless python3 manage.py migrate
# Create a superuser
echo "Creating Paperless superuser..."
sudo -u paperless python3 manage.py createsuperuser
# Configure ImageMagick for PDF processing
echo "Updating ImageMagick policy..."
sudo sed -i 's|<policy domain="coder" rights="none" pattern="PDF" />|<policy domain="coder" rights="read|write" pattern="PDF" />|' /etc/ImageMagick-6/policy.xml
# Configure systemd services
echo "Setting up systemd services..."
cat <<EOL | sudo tee /etc/systemd/system/paperless-webserver.service
[Unit]
Description=Paperless Webserver
After=network.target redis.service
Requires=redis.service
[Service]
User=paperless
Group=paperless
WorkingDirectory=/opt/paperless/src
ExecStart=/usr/bin/python3 manage.py runserver 0.0.0.0:8000
Restart=always
[Install]
WantedBy=multi-user.target
EOL
# Enable and start the Paperless services
sudo systemctl daemon-reload
sudo systemctl enable paperless-webserver
sudo systemctl start paperless-webserver
echo "Paperless-NGX setup complete! Access it at http://localhost:8000"
@@ -0,0 +1,3 @@
sudo mount -a
rsync -r --progress --delete /home/pi/nasdownloadedmedia/Movies /home/pi/ap-share/public
+16
View File
@@ -0,0 +1,16 @@
# raspberrypi
## Overview
Raspberry Pi automation scripts for mounts, package installs, file sharing, and data movement.
## Contents
- `Media_to_ap-share.sh`
- `public_to_usb.sh`
- `rasp_pi_install_apps.sh`
- `raspberry_pi_fstab.sh`
## Usage
Use these scripts on Raspberry Pi systems after checking device-specific paths and service expectations.
## Notes
Embedded or ARM systems can differ from standard Linux hosts, so validate each script on the target hardware.
@@ -0,0 +1,3 @@
sudo mount -a
rsync -r --progress --exclude '/vm' --exclude '/proxmox' --exclude '/.recycle' --delete /home/pi/naspublic/ /media/pi/4tb/public
@@ -0,0 +1,60 @@
!/bin/bash
# ----------------------------------------------------------------------
# | Add repos |
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# | Update sources |
# ----------------------------------------------------------------------
sudo apt-get -y update
sudo apt-get -y dist-upgrade
sudo apt-get -y full-upgrade
# ----------------------------------------------------------------------
# | Install apps |
# ----------------------------------------------------------------------
sudo apt-get -y install \
wireshark\
nmap \
openvpn \
etherape \
remmina \
monitorix \
samba-common-bin \
openssh-server \
smbclient \
cifs-utils \
exfat-fuse \
cups \
software-properties-common \
curl \
unattended-upgrades \
cron-apt \
putty \
gpart \
deja-dup \
git \
curl \
libgconf-2-4
# ----------------------------------------------------------------------
# | Install plugin for Netflix and video play on Pi |
# ----------------------------------------------------------------------
curl -fsSL https://pi.vpetkov.net -o ventz-media-pi
sh ventz-media-pi
# ----------------------------------------------------------------------
# | Complete updates and finalize |
# ----------------------------------------------------------------------
sudo apt-get -y update
sudo apt-get -y dist-upgrade
sudo apt-get -y full-upgrade
sudo apt -y autoremove
sudo apt -y clean
sudo apr -y purge
@@ -0,0 +1,15 @@
# ----------------------------------------------------------------------
# | creates folders for shares, Install fstab entries, maps mounts to nas|
# ----------------------------------------------------------------------
sudo cp /etc/fstab /etc/ftab.orig.backup
# cd ~/home/pi
sudo mkdir /home/pi/naspublic
sudo mkdir /home/pi/nasdownloadedmedia
sudo echo "//nas/public /home/pi/naspublic cifs vers=2.0,username=admin,password=mypassword,file_mode=0777,dir_mode=0777 0 0
//nas/DownloadedMedia /home/pi/nasdownloadedmedia cifs vers=2.0,username=traver,password=mypassword,file_mode=0777,dir_mode=0777 0 0" >> /etc/fstab
sudo mount -a
+14
View File
@@ -0,0 +1,14 @@
# server_config
## Overview
Server configuration entry point with OS-specific setup subfolders for Debian and Ubuntu.
## Contents
- `debian`
- `ubuntu`
## Usage
Start here when preparing a base server and then move into the matching operating-system subfolder.
## Notes
These scripts configure foundational server behavior, so review them closely before running on production systems.
@@ -0,0 +1,13 @@
# server_config/debian
## Overview
Debian-specific server bootstrap and configuration scripts.
## Contents
- `debian-setup.sh`
## Usage
Use these scripts when preparing a Debian server for the expected baseline configuration.
## Notes
Server bootstrap scripts can modify packages, services, and defaults, so apply them deliberately.
@@ -0,0 +1,51 @@
#!/bin/bash
# initial install
apt-get update -y
#adding sudo
apt-get install sudo -y
# add traver sudo
adduser traver sudo
# install open-vm-tools
apt-get install open-vm-tools -y
# installing git and wget
sudo apt install git wget -y
# installing cockpit
sudo apt install cockpit -y
sudo apt install python -y
# Check if /home/traver/public-setupfiles exists
if [ -d "/home/traver/public-setupfiles" ]; then
# Change directory to /home/traver/public-setupfiles
cd /home/traver/public-setupfiles
# Stash any local changes
git stash
# Pull the latest changes from the remote repository
git pull
else
# mkdir for git repo
sudo mkdir -p /home/traver/public-setupfiles
cd /home/traver/public-setupfiles
git init
git remote add origin https://github.com/wickedyoda/public-setupfiles
git pull origin main
git checkout main
fi
# Change permissions
sudo chmod +x -R /home/traver/public-setupfiles
# Run full updates first time
sudo /home/traver/public-setupfiles/updates/updates.sh
# Server apps setup
sudo apt-get -y install cockpit samba-common-bin openssh-server smbclient cifs-utils exfat-fuse curl unattended-upgrades cron-apt git curl
@@ -0,0 +1,14 @@
# server_config/ubuntu
## Overview
Ubuntu-specific server bootstrap and Docker setup scripts.
## Contents
- `ubuntu-docker-install.sh`
- `ubuntu-setup.sh`
## Usage
Use these scripts when preparing Ubuntu servers, especially where Docker is part of the baseline.
## Notes
Review package repositories, Docker prerequisites, and host networking assumptions before running them.
@@ -0,0 +1,29 @@
for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done
# Remove docker.io, docker-doc, docker-compose, podman-docker, containerd, runc
sudo apt-get purge docker.io docker-doc docker-compose podman-docker containerd runc
# update repos
sudo apt-get update
# install dependencies
sudo apt-get install ca-certificates curl -y
sudo install -m 0755 -d /etc/apt/trusted.gpg.d
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/docker.gpg
# Add docker repo to apt/sources.list.d
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/trusted.gpg.d/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
# run apt update
sudo apt-get update
# Install docker and docker-compose
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
# adduser traver to docker
sudo adduser $USER docker
# echo done
echo "Install complete, please reboot"
@@ -0,0 +1,54 @@
#!/bin/bash
# initial install
apt-get update -y
# add traver sudo
adduser traver sudo
# uninstall ufm
apt remove ufw -y
# install open-vm-tools
apt-get install open-vm-tools -y
# installing git and wget
sudo apt install git wget -y
# installing cockpit
sudo apt install cockpit -y
sudo apt install python -y
# Removing ufw
sudo apt remove ufw -y
# Check if /home/traver/public-setupfiles exists
if [ -d "/home/traver/public-setupfiles" ]; then
# Change directory to /home/traver/public-setupfiles
cd /home/traver/public-setupfiles
# Stash any local changes
git stash
# Pull the latest changes from the remote repository
git pull
else
# mkdir for git repo
sudo mkdir -p /home/traver/public-setupfiles
cd /home/traver/public-setupfiles
git init
git remote add origin https://github.com/wickedyoda/public-setupfiles
git pull origin main
git checkout main
fi
# Change permissions
sudo chmod +x -R /home/traver/public-setupfiles
# Run full updates first time
sudo /home/traver/public-setupfiles/updates/updates.sh
# Serer apps setup
sudo apt-get -y install cockpit samba-common-bin openssh-server smbclient cifs-utils exfat-fuse curl unattended-upgrades cron-apt git curl
+13
View File
@@ -0,0 +1,13 @@
# ubuntu-based
## Overview
General Ubuntu and Ubuntu-derived setup scripts.
## Contents
- `ubuntu_install_apps.sh`
## Usage
Use these scripts on Ubuntu-family systems for package and baseline setup tasks.
## Notes
Distribution version differences can affect package availability and service behavior.
@@ -0,0 +1,76 @@
!/bin/bash
# ----------------------------------------------------------------------
# | Add repos |
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# | Update sources |
# ----------------------------------------------------------------------
sudo apt-get -y update
sudo apt-get -y dist-upgrade
sudo apt-get -y full-upgrade
# ----------------------------------------------------------------------
# | Install apps |
# ----------------------------------------------------------------------
sudo apt-get -y install
wireshark\
nmap \
openvpn \
etherape \
remmina \
monitorix \
samba-common-bin \
openssh-server \
smbclient \
cifs-utils \
exfat-fuse \
cups \
software-properties-common \
curl \
unattended-upgrades \
cron-apt \
putty \
gpart \
deja-dup \
git \
curl \
libgconf-2-4 \
libappindicator1
# ----------------------------------------------------------------------
# | Install Discord |
# ----------------------------------------------------------------------
cd /home/traver/Downloads
wget -O discord-0.0.1.deb https://discordapp.com/api/download?platform=linux&format=deb
sudo dpkg -i discord-0.0.1.deb
# ----------------------------------------------------------------------
# | creates folders for shares, Install fstab entries, maps mounts to nas|
# ----------------------------------------------------------------------
sudo cp /etc/fstab /etc/ftab.orig.backup
# cd ~/home/traver
sudo mkdir /home/traver/naspublic
sudo mkdir /home/traver/nasdownloadedmedia
sudo echo "//nas/public /home/traver/naspublic cifs vers=2.0,username=admin,password=mypassword,file_mode=0777,dir_mode=0777 0 0
//nas/DownloadedMedia /home/traver/nasdownloadedmedia cifs vers=2.0,username=traver,password=mypassword,file_mode=0777,dir_mode=0777 0 0" >> /etc/fstab
sudo mount -a
# ----------------------------------------------------------------------
# | Update sources, Second time to complete installs. |
# ----------------------------------------------------------------------
sudo apt-get -y update
sudo apt-get -y dist-upgrade
sudo apt-get -y full-upgrade
sudo apt-get -y autoremove