Build packages / CI (push) Blocked by required conditions
Build packages / Version (push) Waiting to run
CI / Web (format, types, tests, bundles) (push) Blocked by required conditions
CI / ShellCheck (push) Blocked by required conditions
CI / Backend (Go: vet, tests, a real ubusd and uhttpd) (push) Blocked by required conditions
CI / Package files (push) Blocked by required conditions
- **Backend rewritten in Go.** One daemon, `dawnlined`, replaces the whole ucode backend: the rpcd plugin, the agent, the CLI and the updater. The package no longer depends on ucode. - **Per-architecture builds.** The release carries the backend for arm64, ARMv7, mips, mipsle and amd64; the router fetches its own after the package is installed and checks its sha256. Dawnline does not run on other architectures (older ARM, 32-bit x86, RISC-V). - **Faster on the router.** A firewall sync takes 0.06 s instead of 0.9 s; a full apply takes about 300 ms. The portal is served by the daemon itself, without a CGI process per request. - **Live pages.** The admin and the portal follow a live stream from the router instead of re-fetching the whole state every 30 seconds. - **Admin redesigned in the portal's style.** Three sections (Overview · Log · Settings); a server is a page of its own with People, Places and Settings; a device opens as a dialog over its person. - **Changes wait for «Apply».** Every setting, and a person's access, is staged in one dock before it reaches the router. - **Configuration rollout.** After a change that makes devices fetch their configuration again, the admin shows how many have fetched it and who has not. Every setting shows beforehand (⟳N) how many devices it will touch. - **Waiting for a decision.** Overview and People put first the people who need one (access ended, limit reached, a device that does not connect), each with its one action a tap away. - **Bulk actions on people.** «Select» (or a long press on a card) picks several people to extend by a month, pause or resume at once. - **Undo.** An action done from a card or a request is undone from its toast. - **Update dialogs redesigned.** An update is one view from its question to its result; Dawnline's own update runs in it like every other, and the page reloads itself once the new version answers. Other versions are a list, each with its notes and Install on a page of its own. - **Site to site: networks behind a router.** A router connected as a device can have networks behind it (up to eight, /16 to /30): the server routes them and applies the router's access to them. A network that shares addresses with a tunnel, the router's own networks or another site is refused by name. - **Routers from the portal.** People can add a router and name its networks on their own page; the admin accepts or declines with a reason, or lets them through without asking. - **Check access and Health know the networks behind routers.** - **Usage limits reworked.** A monthly limit no longer follows the calendar. A person's month starts with their first traffic and ends a month later; the next one starts only when they connect again, so time away uses up none of it. Before, everyone's limit reset on the 1st. - Extra data lasts until that person's month ends; «Reset usage» starts the month anew. - A limit is for a month or for the whole term; the admin and the portal show when it resets. - Charts that said «this month» show the last 30 days. - After the update nobody loses what was counted: the month that was running becomes the person's first and ends on the 1st. - **Access by time of day removed.** The Hours limit is gone from the admin, the portal and the backend; saved hours are dropped. - **Expiry simplified.** An end date always stops access, with a heads-up three days before; the per-person choice is gone. - **No false disconnects from sleeping phones.** A phone or a tablet stays online through ten minutes of silence. - **Mobile Safari fixes.** Pressing a control no longer sends the page to its top; tab tracks that do not fit scroll; switches animate after a press.
72 lines
3.2 KiB
Bash
Executable File
72 lines
3.2 KiB
Bash
Executable File
#!/bin/sh
|
|
# Dawnline first-run / upgrade housekeeping.
|
|
|
|
# Locations are off by default since 0.5.2 (lookups send addresses to a third
|
|
# party); a router that had them on by the old default keeps them on.
|
|
if [ -f /etc/config/dawnline ] && [ -z "$(uci -q get dawnline.settings.geo_enabled)" ]; then
|
|
uci -q set dawnline.settings.geo_enabled=1
|
|
uci -q commit dawnline
|
|
fi
|
|
|
|
[ -f /etc/config/dawnline ] || cat > /etc/config/dawnline <<'CFG'
|
|
config settings 'settings'
|
|
option portal_enabled '0'
|
|
option portal_port '8443'
|
|
option default_device_limit '3'
|
|
option hostnames '1'
|
|
CFG
|
|
chmod 600 /etc/config/dawnline
|
|
mkdir -p /etc/dawnline && chmod 700 /etc/dawnline
|
|
# Webhook alerts were removed.
|
|
uci -q delete dawnline.settings.webhook_url
|
|
uci -q delete dawnline.settings.alert
|
|
uci -q commit dawnline
|
|
rm -f /etc/dawnline/alerts.json
|
|
# Backups moved into Settings.
|
|
rm -f /www/luci-static/resources/view/dawnline/backups.js
|
|
# "Pause everyone" is gone: turning a server off does the same, so a
|
|
# router left paused keeps its servers off instead of letting everyone in.
|
|
if [ "$(uci -q get dawnline.settings.paused_all)" = 1 ]; then
|
|
for s in $(uci -q show dawnline | sed -n 's/^dawnline\.\([^.=]*\)=server$/\1/p'); do uci -q set "dawnline.$s.enabled=0"; done
|
|
fi
|
|
uci -q delete dawnline.settings.paused_all
|
|
uci -q commit dawnline
|
|
# Portal assets moved out of the web root (served only with a valid code).
|
|
rm -rf /usr/share/dawnline/portal/www/assets
|
|
|
|
# "Find home devices" (0.3.0) is gone: its option and dnsmasq records too.
|
|
for s in $(uci -q show dawnline | sed -n 's/^dawnline\.\([^.]*\)\.bonjour=.*/\1/p'); do uci -q delete "dawnline.$s.bonjour"; done
|
|
uci -q commit dawnline
|
|
if ls /tmp/dnsmasq*.d/dawnline-bonjour.conf >/dev/null 2>&1; then
|
|
rm -f /tmp/dnsmasq*.d/dawnline-bonjour.conf /var/run/dawnline/bonjour.json
|
|
/etc/init.d/dnsmasq restart 2>/dev/null
|
|
fi
|
|
|
|
# LuCI caches: menu index, and module URLs (?v= follows the opkg status time).
|
|
rm -f /tmp/luci-indexcache* /tmp/luci-modulecache/* 2>/dev/null
|
|
touch /usr/lib/opkg/status 2>/dev/null
|
|
|
|
# The agent's heartbeat check went with the agent: procd restarts the backend.
|
|
grep -qs /usr/libexec/dawnline/heartbeat /etc/crontabs/root && {
|
|
sed -i '\#/usr/libexec/dawnline/heartbeat#d' /etc/crontabs/root
|
|
/etc/init.d/cron restart 2>/dev/null
|
|
}
|
|
# What the ucode backend was made of, left by a version that had it (the package manager removes what a
|
|
# package no longer ships; a tarball laid over it does not).
|
|
rm -rf /usr/share/ucode/dawnline /usr/share/rpcd/ucode/luci.dawnline /usr/libexec/dawnline/agent /usr/libexec/dawnline/cli \
|
|
/usr/libexec/dawnline/updater.uc /usr/libexec/dawnline/heartbeat /usr/share/dawnline/portal/cgi.uc /usr/share/dawnline/portal/www
|
|
rm -f /etc/dawnline/backend-off /etc/dawnline/backend-watch /etc/dawnline/backend-portal /etc/dawnline/backend-sync /etc/dawnline/backend-apply /etc/dawnline/backend-shadow
|
|
|
|
# rpcd reads the access lists once (the backend's object is in them), and forgets the plugin that is gone.
|
|
/etc/init.d/rpcd reload
|
|
sleep 1
|
|
# A fresh install starts the service; an upgrade restarts it only where the
|
|
# admin had it on (a disabled Dawnline stays that way).
|
|
if [ "$PKG_UPGRADE" = 1 ]; then
|
|
/etc/init.d/dawnline enabled && /etc/init.d/dawnline restart
|
|
else
|
|
/etc/init.d/dawnline enable
|
|
/etc/init.d/dawnline restart
|
|
fi
|
|
exit 0
|