- Diagnostics page: Health and Log tabs in place of Health and Activity - Watchdog: repairs the AmneziaWG module, tunnels, nft table, firewall rules, uhttpd portal setting, portal, resolver and rpcd after two bad checks in a row, with backoff; after 3 failed repairs logs once in red, keeps repairing quietly and logs "restored" when it works again - Heartbeat cron job restarts a hung agent - Service log: tunnel and service starts with reasons (restarted, router start, update, crash), stops Dawnline made itself vs unexpected ones, certificate renewal and expiry, WAN address changes - Admin actions logged as "You ..." with their own icon and tint; every event has an icon tile; names kept for removed people and devices; server pill on events when there are several servers - Log filters: All, Connections, People, System, Problems; search and the command palette removed - Home network reaches people's devices: fw4 forwarding from the home zones, limited to people with home access - "Devices reach each other" per server, in the Access card - Portal: "This device" card first with a dotted border, key rotation and copy address in the menu, devices sorted Online/Offline/Not set up/Paused, over-limit slots in orange - People cards: slot bar, Online / Never connected, add chip always shown - Person and device pages: Add device tile, Connect at the bottom with File/Key/QR tabs, status text without dots; pulsing server tab dot - Server pill: Running / Not running / Turned off
41 lines
1.4 KiB
Bash
Executable File
41 lines
1.4 KiB
Bash
Executable File
#!/bin/sh
|
|
# Dawnline first-run / upgrade housekeeping.
|
|
|
|
[ -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
|
|
# Portal assets moved out of the web root (served only with a valid code).
|
|
rm -rf /usr/share/dawnline/portal/www/assets
|
|
|
|
# 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
|
|
|
|
# Cron restarts the agent when it stops ticking (Health → Watchdog).
|
|
mkdir -p /etc/crontabs
|
|
grep -qs /usr/libexec/dawnline/heartbeat /etc/crontabs/root || {
|
|
echo '*/5 * * * * /usr/libexec/dawnline/heartbeat' >> /etc/crontabs/root
|
|
/etc/init.d/cron restart 2>/dev/null
|
|
}
|
|
|
|
/etc/init.d/rpcd reload
|
|
# A reload keeps LuCI logins but sometimes misses the plugin; restart only then.
|
|
sleep 2
|
|
ubus list luci.dawnline >/dev/null 2>&1 || { /etc/init.d/rpcd restart; sleep 2; }
|
|
/etc/init.d/dawnline enable
|
|
/etc/init.d/dawnline restart
|
|
exit 0
|