diff --git a/bin/toolbox b/bin/toolbox index d8949fe..4e2534d 100755 --- a/bin/toolbox +++ b/bin/toolbox @@ -319,16 +319,6 @@ TOOLS = [ "/ dog --json example.com | jq", "dog example.com", "dog", linux=False), - Tool("Netzwerk", "zert-check", - "SSL-Zertifikate aller motocamp.de Domains prüfen", - "Prüft alle motocamp.de Subdomains auf Zertifikatsgültigkeit.\n" - "Zeigt Ablaufdatum und verbleibende Tage mit Farbkodierung:\n" - " grün = ok (>30 Tage)\n" - " gelb = bald fällig (≤30 Tage)\n" - " rot = kritisch (≤7 Tage) oder nicht erreichbar\n" - "Bsp: zert-check", - "zert-check", "zert-check", brew=""), - # ── Text & Daten ───────────────────────────────────────────────────────── Tool("Text/Daten", "jq", "JSON-Prozessor für Kommandozeile", diff --git a/bin/zert-check b/bin/zert-check deleted file mode 100755 index 5d5c3f6..0000000 --- a/bin/zert-check +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/env bash -# zert-check — SSL-Zertifikate aller motocamp.de Subdomains prüfen - -RED='\033[0;31m' -YELLOW='\033[1;33m' -GREEN='\033[0;32m' -BOLD='\033[1m' -RESET='\033[0m' - -DOMAINS=( - motocamp.de - www.motocamp.de - dsm.motocamp.de - akku.motocamp.de - akkudb.motocamp.de - audiobooks.motocamp.de - bitwarden.motocamp.de - calibre.motocamp.de - docs.motocamp.de - git.motocamp.de - grafana.motocamp.de - home.motocamp.de - immich.motocamp.de - iobroker.motocamp.de - mealie.motocamp.de - n8n.motocamp.de - npm.motocamp.de - pairdrop.motocamp.de - paperless.motocamp.de -) - -printf "${BOLD}%-35s %-12s %-12s %s${RESET}\n" "Domain" "Läuft ab" "Tage" "Status" -printf '%0.s─' {1..70}; echo - -TODAY=$(date +%s) - -for domain in "${DOMAINS[@]}"; do - result=$(echo | openssl s_client -connect "${domain}:443" -servername "$domain" 2>/dev/null \ - | openssl x509 -noout -enddate 2>/dev/null) - - if [[ -z "$result" ]]; then - printf "%-35s ${RED}%-12s${RESET}\n" "$domain" "nicht erreichbar" - continue - fi - - enddate=$(echo "$result" | sed 's/notAfter=//') - expiry_epoch=$(date -j -f "%b %d %T %Y %Z" "$enddate" +%s 2>/dev/null \ - || date -d "$enddate" +%s 2>/dev/null) - - days_left=$(( (expiry_epoch - TODAY) / 86400 )) - expiry_fmt=$(date -j -f "%b %d %T %Y %Z" "$enddate" "+%d.%m.%Y" 2>/dev/null \ - || date -d "$enddate" "+%d.%m.%Y" 2>/dev/null) - - if (( days_left <= 7 )); then - color=$RED - status="KRITISCH" - elif (( days_left <= 30 )); then - color=$YELLOW - status="bald fällig" - else - color=$GREEN - status="ok" - fi - - printf "%-35s ${color}%-12s %-12s %s${RESET}\n" \ - "$domain" "$expiry_fmt" "${days_left}d" "$status" -done diff --git a/zsh/.zshrc b/zsh/.zshrc index 8486e48..1e49040 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -295,7 +295,6 @@ fi alias gitsync="~/git-projekte/dotfiles-rene/bin/git-sync-all.sh" alias mac-sync="curl -fsSL https://git.motocamp.de/rene/dotfiles-rene/raw/branch/main/bin/git-sync-all.sh | bash" -alias zert-check="~/git-projekte/dotfiles-rene/bin/zert-check" # 8) Conda-Initialisierung # ----------------------------------------------------------