Add intelligent system detection and Proxmox support

New features:
- detect-system.sh: Automatically detects target system type
  - Proxmox VE
  - pfSense
  - TrueNAS
  - UCS
  - Unknown/generic

- deploy-proxmox.sh: Automated Proxmox certificate deployment
  - Backs up existing certificates
  - Installs certificate to /etc/pve/local/pveproxy-ssl.*
  - Restarts pveproxy service
  - Fully automated deployment

- cert-manager.py enhancements:
  - Detects system type before proceeding
  - Uses system-specific deployment scripts when available
  - Shows detected system type in summary
  - Intelligent deployment based on system capabilities
  - Manual deployment instructions for unsupported systems
This commit is contained in:
root
2025-10-23 08:28:23 +02:00
parent 5837c35b7c
commit d9e3356e9a
3 changed files with 186 additions and 12 deletions

23
detect-system.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
# Detect system type on remote host
# Usage: ./detect-system.sh <hostname>
TARGET_HOST="$1"
if [ -z "$TARGET_HOST" ]; then
echo "Usage: $0 <hostname>"
exit 1
fi
# Try to detect system type
if ssh -o ConnectTimeout=5 root@${TARGET_HOST} "test -f /usr/bin/pvesh" 2>/dev/null; then
echo "proxmox"
elif ssh -o ConnectTimeout=5 root@${TARGET_HOST} "test -f /usr/local/bin/freenas-version || test -f /usr/local/bin/truenas-version" 2>/dev/null; then
echo "truenas"
elif ssh -o ConnectTimeout=5 root@${TARGET_HOST} "test -f /usr/local/sbin/pfSsh.php" 2>/dev/null; then
echo "pfsense"
elif ssh -o ConnectTimeout=5 root@${TARGET_HOST} "test -f /usr/sbin/univention-config-registry" 2>/dev/null; then
echo "ucs"
else
echo "unknown"
fi