add optional web UI: busybox httpd + shell CGI, dark theme
- /etc/init.d/wirecon-web supervises `busybox httpd` on WEB_PORT (8080).
- /var/www/wirecon: single-page UI with Status / Config / Logs tabs.
- Status auto-refreshes every 5s: service states + wg0 endpoint,
handshake age, MTU, rx/tx.
- Config edits wg0.conf + wirecon.conf, saves atomically, restarts
dependents, surfaces their output.
- Logs tails /var/log/wirecon-{watchdog,monitor}.log.
- CGI returns plain text (key=value or raw) — no JSON-escape pain.
- HTTP Basic Auth template in /etc/wirecon/httpd.conf.
- Disable via `rc-service wirecon-web stop && rc-update del wirecon-web`.
This commit is contained in:
1 parent
2d07a590e2
commit
4e7e0f34ba
12 files changed
+543
-4
No files matched your search
Executable
+26
@@ -0,0 +1,26 @@
|
||||
#!/sbin/openrc-run
|
||||
# wirecon web UI — busybox httpd serving /var/www/wirecon with CGI.
|
||||
# Disable to save resources:
|
||||
# rc-service wirecon-web stop && rc-update del wirecon-web
|
||||
|
||||
name="wirecon-web"
|
||||
description="wirecon web UI (busybox httpd)"
|
||||
|
||||
# Pull WEB_PORT from wirecon.conf if present.
|
||||
: "${WIRECON_CONF:=/etc/wirecon/wirecon.conf}"
|
||||
[ -r "$WIRECON_CONF" ] && . "$WIRECON_CONF"
|
||||
: "${WEB_PORT:=8080}"
|
||||
: "${WEB_BIND:=0.0.0.0}"
|
||||
: "${WEB_ROOT:=/var/www/wirecon}"
|
||||
|
||||
supervisor="supervise-daemon"
|
||||
command="/bin/busybox"
|
||||
command_args="httpd -f -v -p ${WEB_BIND}:${WEB_PORT} -h ${WEB_ROOT} -c /etc/wirecon/httpd.conf"
|
||||
respawn_delay=5
|
||||
respawn_max=0
|
||||
output_log="/var/log/wirecon-web.log"
|
||||
error_log="/var/log/wirecon-web.log"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
||||
Reference in new issue
Block a user