feat: GL kit-connect ipk + one-button wizard + web dashboard for both platforms

Synology kit-connect (SPK):
- wizard.sh — one-button Keylink IT fleet setup (auto-runs on install)
- www/index.html — dark-themed local dashboard (same design as busrouter)
- bin/serve-dashboard.sh — busybox httpd on port 8089 with CGI endpoints
- start-stop-status updated to manage dashboard alongside daemon
- INFO updated: RT2600ac + RT6600ax compatibility noted
- postinst now runs wizard --auto for first-time setup

GL kit-connect (OpenWrt ipk):
- Makefile — DEPENDS: +curl +openssh-client +tailscale
- procd init — USE_PROCD=1, respawn with 5s delay
- connect-daemon.sh — Tailscale + reverse SSH (same as Synology version)
- connect-wizard.sh — one-button setup, idempotent, UCI config
- connect-register.sh — standalone hub registration
- www/kitconnect/index.html — dark-themed dashboard with wizard button
- www/kitconnect/wizard.cgi — web-triggered wizard endpoint
- UCI config at /etc/config/kitconnect

Both platforms share: same hub protocol, same Tailscale key, same port pool.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-22 03:10:32 +00:00
parent 0c68fb2461
commit 52e7e478e4
16 changed files with 1241 additions and 77 deletions
+24 -38
View File
@@ -1,22 +1,17 @@
#!/bin/sh
# build.sh — Assemble kit-connect SPK for Synology SRM (ipq806x)
# Compatible: RT2600ac, RT6600ax, all ipq806x SRM routers.
# Output: kit-connect-0.1-0001.spk
#
# SPK structure (outer tar, UNCOMPRESSED):
# INFO
# PACKAGE_ICON.PNG (64x64)
# PACKAGE_ICON.PNG (72x72)
# PACKAGE_ICON_256.PNG (256x256)
# scripts/
# postinst
# start-stop-status
# preinst
# preuninst
# postuninst
# postinst, start-stop-status, preinst, preuninst, postuninst
# conf/
# privilege
# resource
# package.tgz (gzipped inner tar of bin/ + conf/)
# checksum (md5 of package.tgz)
# privilege, resource
# package.tgz (gzipped inner tar: bin/ + conf/connect.conf + wizard.sh + www/)
set -e
@@ -30,42 +25,34 @@ BUILD_DIR="/tmp/kit-connect-build-$$"
echo "=== Building ${PKG_NAME}-${VERSION}.spk ==="
# Clean and create build staging directory
rm -rf "$BUILD_DIR"
mkdir -p "$BUILD_DIR"
# ── 1. Create inner package.tgz (gzipped tar of bin/ + conf/) ─────────
# ── 1. Create inner package.tgz ─────────────────────────────────
echo " → Creating package.tgz"
tar -czf "$BUILD_DIR/package.tgz" \
--format=ustar \
bin/ \
conf/connect.conf
--format=ustar \
bin/ \
conf/connect.conf \
wizard.sh \
www/
# ── 2. Generate checksum ──────────────────────────────────────────────
echo " → Computing checksum"
md5sum "$BUILD_DIR/package.tgz" | awk '{print $1}' > "$BUILD_DIR/checksum"
echo " → package.tgz contents:"
tar tzf "$BUILD_DIR/package.tgz"
# ── 2. Stage and assemble outer SPK (NO checksum — deprecated) ──
STAGE="$BUILD_DIR/stage"
mkdir -p "$STAGE"
cp INFO PACKAGE_ICON.PNG PACKAGE_ICON_256.PNG "$STAGE/"
cp -r scripts "$STAGE/"
mkdir -p "$STAGE/conf"
cp conf/privilege conf/resource "$STAGE/conf/"
cp "$BUILD_DIR/package.tgz" "$STAGE/"
# ── 3. Assemble outer SPK (UNCOMPRESSED tar) ──────────────────────────
echo " → Assembling SPK"
tar -cf "${OUTPUT}" \
--format=ustar \
-C "$SCRIPT_DIR" \
INFO \
PACKAGE_ICON.PNG \
PACKAGE_ICON_256.PNG \
scripts/ \
-C "$BUILD_DIR" \
package.tgz \
checksum
tar -cf "${OUTPUT}" -C "$STAGE" --format=ustar \
INFO PACKAGE_ICON.PNG PACKAGE_ICON_256.PNG scripts conf package.tgz
# SPK conf/ goes in the outer tar too
tar -rf "${OUTPUT}" \
--format=ustar \
-C "$SCRIPT_DIR" \
conf/privilege \
conf/resource
# ── 4. Verify ─────────────────────────────────────────────────────────
echo " → Verifying SPK contents"
tar -tf "${OUTPUT}" | sort
@@ -75,5 +62,4 @@ echo "=== Build complete: ${OUTPUT} ==="
echo " Size: ${SIZE} bytes"
echo " MD5: $(md5sum "${OUTPUT}" | awk '{print $1}')"
# Cleanup
rm -rf "$BUILD_DIR"