Build packages / Version (push) Waiting to run
LuCI admin (people, devices, limits, disguise, health, updates, backups) and a personal self-service portal, built as ipk (OpenWrt 24.10) and apk (OpenWrt 25.12) with the OpenWrt SDK. Successor of openwrt-liminal. - install.sh: checks the router, installs AmneziaWG for its firmware, then the release package verified against sha256sums.txt - CI: Prettier, types, tests, committed bundles, ShellCheck, ucode checks; tagged releases build both packages and publish them - Web bundles minified with esbuild (JS and CSS) - README with framed screenshots
26 lines
1014 B
Bash
Executable File
26 lines
1014 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Dev deploy: build the release tarball and install it on a router over SSH.
|
|
# scripts/deploy.sh [root@host]
|
|
# Backs up the configs Dawnline touches to /root/dawnline-predeploy-<ts>/ first.
|
|
set -euo pipefail
|
|
|
|
HOST="${1:-root@outline.lan}"
|
|
TAR="$("$(dirname "$0")/build-release.sh" | tail -n1)"
|
|
|
|
scp -q "$TAR" "$HOST:/tmp/luci-app-dawnline.tar.gz"
|
|
ssh "$HOST" sh <<'REMOTE'
|
|
set -e
|
|
ts="$(date +%Y%m%d-%H%M%S)"
|
|
mkdir -p "/root/dawnline-predeploy-$ts"
|
|
for c in network firewall dhcp dawnline; do
|
|
[ -f "/etc/config/$c" ] && cp "/etc/config/$c" "/root/dawnline-predeploy-$ts/$c"
|
|
done
|
|
# Keep only the five most recent pre-deploy backups.
|
|
ls -d /root/dawnline-predeploy-* 2>/dev/null | sort | head -n -5 | xargs -r rm -rf
|
|
tar -xozf /tmp/luci-app-dawnline.tar.gz -C /
|
|
rm -f /tmp/luci-app-dawnline.tar.gz
|
|
sh /etc/uci-defaults/90_dawnline && rm -f /etc/uci-defaults/90_dawnline
|
|
sleep 1
|
|
ubus list luci.dawnline >/dev/null && echo "luci.dawnline registered (backup: /root/dawnline-predeploy-$ts)"
|
|
REMOTE
|