refactor:rename-project-to-openhop

This commit is contained in:
Lloyd
2026-06-24 23:27:49 +01:00
parent 2b07e79ccd
commit 2b67dea96b
83 changed files with 719 additions and 649 deletions
+7 -7
View File
@@ -1,5 +1,5 @@
#!/bin/bash
# Build development .deb package for pyMC_Repeater
# Build development .deb package for openhop-repeater
# Allows building from untagged commits with ~dev version suffix
set -euo pipefail
@@ -31,7 +31,7 @@ log_step() {
cd "$(dirname "$0")/.."
PROJECT_ROOT=$(pwd)
log_info "Building development .deb package for pyMC_Repeater..."
log_info "Building development .deb package for openhop-repeater..."
log_info "Project root: $PROJECT_ROOT"
# Check if we're in a git repository
@@ -69,7 +69,7 @@ log_info "Debian version: $DEBIAN_VERSION"
log_step "Updating debian/changelog..."
CHANGELOG_DATE=$(date -R)
cat > debian/changelog << EOF
pymc-repeater ($DEBIAN_VERSION) unstable; urgency=medium
openhop-repeater ($DEBIAN_VERSION) unstable; urgency=medium
* Development build from git commit $(git rev-parse --short HEAD)
* Version: $VERSION
@@ -81,11 +81,11 @@ log_info "Changelog updated with version $DEBIAN_VERSION"
# Clean previous builds
log_step "Cleaning previous builds..."
rm -rf debian/pymc-repeater/
rm -rf debian/openhop-repeater/
rm -rf debian/.debhelper/
rm -rf debian/files
rm -f debian/pymc-repeater.*.debhelper
rm -f debian/pymc-repeater.substvars
rm -f debian/openhop-repeater.*.debhelper
rm -f debian/openhop-repeater.substvars
rm -f debian/*.log
rm -rf .pybuild/
rm -rf build/
@@ -108,7 +108,7 @@ else
fi
# Find and display the built package
DEB_FILE=$(find .. -maxdepth 1 -name "pymc-repeater_${DEBIAN_VERSION}_*.deb" -type f | head -n 1)
DEB_FILE=$(find .. -maxdepth 1 -name "openhop-repeater_${DEBIAN_VERSION}_*.deb" -type f | head -n 1)
if [ -n "$DEB_FILE" ]; then
log_info ""
+7 -7
View File
@@ -1,5 +1,5 @@
#!/bin/bash
# Build production .deb package for pyMC_Repeater
# Build production .deb package for openhop-repeater
# Requires a clean git tag - fails if not on a tagged commit
set -euo pipefail
@@ -31,7 +31,7 @@ log_step() {
cd "$(dirname "$0")/.."
PROJECT_ROOT=$(pwd)
log_info "Building production .deb package for pyMC_Repeater..."
log_info "Building production .deb package for openhop-repeater..."
log_info "Project root: $PROJECT_ROOT"
# Check if we're in a git repository
@@ -106,7 +106,7 @@ log_info "Debian version: $DEBIAN_VERSION"
log_step "Updating debian/changelog..."
CHANGELOG_DATE=$(date -R)
cat > debian/changelog << EOF
pymc-repeater ($DEBIAN_VERSION) stable; urgency=medium
openhop-repeater ($DEBIAN_VERSION) stable; urgency=medium
* Production release $VERSION
* Git tag: $TAG
@@ -119,11 +119,11 @@ log_info "Changelog updated with version $DEBIAN_VERSION"
# Clean previous builds
log_step "Cleaning previous builds..."
rm -rf debian/pymc-repeater/
rm -rf debian/openhop-repeater/
rm -rf debian/.debhelper/
rm -rf debian/files
rm -f debian/pymc-repeater.*.debhelper
rm -f debian/pymc-repeater.substvars
rm -f debian/openhop-repeater.*.debhelper
rm -f debian/openhop-repeater.substvars
rm -f debian/*.log
rm -rf .pybuild/
rm -rf build/
@@ -146,7 +146,7 @@ else
fi
# Find and display the built package
DEB_FILE=$(find .. -maxdepth 1 -name "pymc-repeater_${DEBIAN_VERSION}_*.deb" -type f | head -n 1)
DEB_FILE=$(find .. -maxdepth 1 -name "openhop-repeater_${DEBIAN_VERSION}_*.deb" -type f | head -n 1)
if [ -n "$DEB_FILE" ]; then
# Run lintian to check package quality
+27 -27
View File
@@ -1,24 +1,24 @@
#!/usr/bin/env bash
# pyMC Repeater - Proxmox LXC Installer
# Creates an LXC container with USB passthrough and installs pyMC Repeater
# openHop Repeater - Proxmox LXC Installer
# Creates an LXC container with USB passthrough and installs openHop Repeater
#
# Usage (run on the Proxmox host):
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/pyMC-dev/pyMC_Repeater/main/scripts/proxmox-install.sh)"
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/pyMC-dev/openhop-repeater/main/scripts/proxmox-install.sh)"
#
# License: MIT
# Source: https://github.com/pyMC-dev/pyMC_Repeater
# Source: https://github.com/pyMC-dev/openhop-repeater
set -euo pipefail
# ── Defaults ───────────────────────────────────────────────────────────────
REPO="https://github.com/pyMC-dev/pyMC_Repeater.git"
REPO="https://github.com/pyMC-dev/openhop-repeater.git"
BRANCH="dev"
CT_TEMPLATE="debian-12-standard"
CT_RAM=1024
CT_SWAP=512
CT_DISK=4
CT_CORES=2
CT_HOSTNAME="pymc-repeater"
CT_HOSTNAME="openhop-repeater"
CT_BRIDGE="vmbr0"
CT_STORAGE="local-lvm"
CT_TEMPLATE_STORAGE="local"
@@ -37,7 +37,7 @@ header() {
clear
echo -e "${BLD}"
echo "═══════════════════════════════════════════════════════════════"
echo " pyMC Repeater - Proxmox LXC Installer"
echo " openHop Repeater - Proxmox LXC Installer"
echo "═══════════════════════════════════════════════════════════════"
echo -e "${CL}"
}
@@ -154,7 +154,7 @@ msg_ok "Container created"
msg_info "Configuring USB passthrough..."
cat >> "/etc/pve/lxc/${CTID}.conf" <<'EOF'
# CH341 USB passthrough for pyMC Repeater
# CH341 USB passthrough for openHop Repeater
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/bus/usb dev/bus/usb none bind,optional,create=dir 0 0
EOF
@@ -209,41 +209,41 @@ IP=\$(hostname -I | awk '{print \$1}')
OS=\$(. /etc/os-release && echo \"\$NAME\")
VER=\$(. /etc/os-release && echo \"\$VERSION_ID\")
echo \"\"
echo \" pyMC Repeater LXC Container\"
echo \" 🌐 GitHub: https://github.com/pyMC-dev/pyMC_Repeater\"
echo \" openHop Repeater LXC Container\"
echo \" 🌐 GitHub: https://github.com/pyMC-dev/openhop-repeater\"
echo \"\"
echo \" 🖥️ OS: \$OS - Version: \$VER\"
echo \" 🏠 Hostname: \$HOSTNAME\"
echo \" 💡 IP Address: \$IP\"
echo \" 📡 Dashboard: http://\$IP:8000\"
echo \"\"
echo \" Management: cd /opt/pymc_repeater && bash manage.sh\"
echo \" Management: cd /opt/openhop_repeater && bash manage.sh\"
echo \"\"
MOTD
chmod +x /etc/profile.d/pymc-motd.sh
"
msg_ok "curl/git installed, locale fixed, console auto-login enabled"
msg_info "Cloning pyMC_Repeater (branch: ${BRANCH})..."
pct exec "$CTID" -- bash -c "git clone --branch ${BRANCH} ${REPO} /root/pyMC_Repeater"
msg_info "Cloning openhop-repeater (branch: ${BRANCH})..."
pct exec "$CTID" -- bash -c "git clone --branch ${BRANCH} ${REPO} /root/openhop-repeater"
msg_ok "Repository cloned"
# Pre-seed config with CH341 radio type and correct GPIO pins
pct exec "$CTID" -- bash -c "
mkdir -p /etc/pymc_repeater
if [ -f /root/pyMC_Repeater/config.yaml.example ]; then
cp /root/pyMC_Repeater/config.yaml.example /etc/pymc_repeater/config.yaml
mkdir -p /etc/openhop_repeater
if [ -f /root/openhop-repeater/config.yaml.example ]; then
cp /root/openhop-repeater/config.yaml.example /etc/openhop_repeater/config.yaml
# Set radio type to CH341
sed -i 's/^radio_type: sx1262$/radio_type: sx1262_ch341/' /etc/pymc_repeater/config.yaml
sed -i 's/^radio_type: sx1262$/radio_type: sx1262_ch341/' /etc/openhop_repeater/config.yaml
# Replace Pi BCM GPIO pins with CH341 GPIO pin numbers (0-7)
sed -i 's/cs_pin: 21/cs_pin: 0/' /etc/pymc_repeater/config.yaml
sed -i 's/reset_pin: 18/reset_pin: 2/' /etc/pymc_repeater/config.yaml
sed -i 's/busy_pin: 20/busy_pin: 4/' /etc/pymc_repeater/config.yaml
sed -i 's/irq_pin: 16/irq_pin: 6/' /etc/pymc_repeater/config.yaml
sed -i 's/rxen_pin: -1/rxen_pin: 1/' /etc/pymc_repeater/config.yaml
sed -i 's/cs_pin: 21/cs_pin: 0/' /etc/openhop_repeater/config.yaml
sed -i 's/reset_pin: 18/reset_pin: 2/' /etc/openhop_repeater/config.yaml
sed -i 's/busy_pin: 20/busy_pin: 4/' /etc/openhop_repeater/config.yaml
sed -i 's/irq_pin: 16/irq_pin: 6/' /etc/openhop_repeater/config.yaml
sed -i 's/rxen_pin: -1/rxen_pin: 1/' /etc/openhop_repeater/config.yaml
# Enable TCXO and DIO2 RF switch for E22 module
sed -i 's/use_dio3_tcxo: false/use_dio3_tcxo: true/' /etc/pymc_repeater/config.yaml
sed -i 's/use_dio2_rf: false/use_dio2_rf: true/' /etc/pymc_repeater/config.yaml
sed -i 's/use_dio3_tcxo: false/use_dio3_tcxo: true/' /etc/openhop_repeater/config.yaml
sed -i 's/use_dio2_rf: false/use_dio2_rf: true/' /etc/openhop_repeater/config.yaml
fi
"
@@ -251,7 +251,7 @@ pct exec "$CTID" -- bash -c "
msg_info "Running manage.sh install (this will take several minutes)..."
echo ""
# Use lxc-attach with a pty so manage.sh gets an interactive terminal
lxc-attach -n "$CTID" -- bash -c "cd /root/pyMC_Repeater && TERM=xterm bash manage.sh install"
lxc-attach -n "$CTID" -- bash -c "cd /root/openhop-repeater && TERM=xterm bash manage.sh install"
echo ""
msg_ok "manage.sh install completed"
@@ -263,7 +263,7 @@ CT_IP=$(pct exec "$CTID" -- hostname -I 2>/dev/null | awk '{print $1}')
echo ""
echo -e "${BLD}"
echo "═══════════════════════════════════════════════════════════════"
echo " ✓ pyMC Repeater Installation Complete!"
echo " ✓ openHop Repeater Installation Complete!"
echo "═══════════════════════════════════════════════════════════════"
echo -e "${CL}"
echo -e " Container: ${GN}${CTID}${CL} (${CT_HOSTNAME})"
@@ -271,6 +271,6 @@ echo -e " IP Address: ${GN}${CT_IP:-unknown}${CL}"
echo -e " Dashboard: ${GN}http://${CT_IP:-<ip>}:8000${CL}"
echo ""
echo " Next: open the dashboard and complete the setup wizard"
echo " Management: pct enter ${CTID}, then: cd /opt/pymc_repeater && bash manage.sh"
echo " Management: pct enter ${CTID}, then: cd /opt/openhop_repeater && bash manage.sh"
echo ""
echo "═══════════════════════════════════════════════════════════════"
+2 -2
View File
@@ -1,5 +1,5 @@
#!/bin/bash
# Setup Debian/Ubuntu build environment for pyMC_Repeater
# Setup Debian/Ubuntu build environment for openhop-repeater
# This script installs all required build dependencies using apt
set -euo pipefail
@@ -28,7 +28,7 @@ if [ "$EUID" -ne 0 ]; then
exit 1
fi
log_info "Setting up build environment for pyMC_Repeater..."
log_info "Setting up build environment for openhop-repeater..."
# Update package list
log_info "Updating package lists..."