Proxmox installer PW

This commit is contained in:
Lloyd
2026-02-24 09:47:36 +00:00
parent 496c5a960a
commit 0f54a05596
2 changed files with 22 additions and 3 deletions
+9 -2
View File
@@ -182,9 +182,16 @@ install_repeater() {
# Welcome screen
$DIALOG --backtitle "pyMC Repeater Management" --title "Welcome" --msgbox "\nWelcome to pyMC Repeater Setup\n\nThis installer will configure your Linux system as a LoRa mesh network repeater.\n\nPress OK to continue..." 12 70
# SPI Check - Universal approach that works on all boards
# SPI Check - skip for CH341 USB-SPI adapter (handles SPI over USB)
SPI_MISSING=0
if ! ls /dev/spidev* >/dev/null 2>&1; then
USES_CH341=0
if [ -f "$CONFIG_DIR/config.yaml" ]; then
if grep -q "radio_type:.*sx1262_ch341" "$CONFIG_DIR/config.yaml" 2>/dev/null; then
USES_CH341=1
fi
fi
if [ "$USES_CH341" -eq 0 ] && ! ls /dev/spidev* >/dev/null 2>&1; then
# SPI devices not found, check if we're on a Raspberry Pi and can enable it
CONFIG_FILE=""
if [ -f "/boot/firmware/config.txt" ]; then
+13 -1
View File
@@ -94,6 +94,8 @@ AVAILABLE_STORAGES=$(pvesm status -content rootdir 2>/dev/null | awk 'NR>1 {prin
echo " Available storages: ${AVAILABLE_STORAGES}"
read -p " Storage [${CT_STORAGE}]: " -r input; CT_STORAGE="${input:-$CT_STORAGE}"
read -p " Git branch [${BRANCH}]: " -r input; BRANCH="${input:-$BRANCH}"
read -sp " Root password [pymc]: " CT_PASSWORD; echo
CT_PASSWORD="${CT_PASSWORD:-pymc}"
# ── Get next CTID ─────────────────────────────────────────────────────────
CTID=$(pvesh get /cluster/nextid)
@@ -131,6 +133,7 @@ pct create "$CTID" "${CT_TEMPLATE_STORAGE}:vztmpl/${TEMPLATE_FILE}" \
--features nesting=1 \
--onboot 1 \
--start 0 \
--password "$CT_PASSWORD" \
--ostype debian
msg_ok "Container created"
@@ -167,8 +170,17 @@ msg_info "Installing git inside container..."
pct exec "$CTID" -- bash -c "
export DEBIAN_FRONTEND=noninteractive
apt-get update -qq && apt-get install -y git whiptail >/dev/null 2>&1
# Enable auto-login on console (no password prompt in Proxmox web console)
mkdir -p /etc/systemd/system/container-getty@1.service.d
cat > /etc/systemd/system/container-getty@1.service.d/override.conf <<'AUTOLOGIN'
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM
AUTOLOGIN
systemctl daemon-reload
"
msg_ok "Git installed"
msg_ok "Git installed, console auto-login enabled"
msg_info "Cloning pyMC_Repeater (branch: ${BRANCH})..."
pct exec "$CTID" -- bash -c "git clone --branch ${BRANCH} ${REPO} /root/pyMC_Repeater"