Files
wirecon/lxc/etc/init.d/wirecon-web
T
d4nn13andClaude Opus 4.7 78c3a790be auto-start services, prompt for WG + LAN nets, fix busybox httpd applet
- create-lxc.sh prompts for WIRECON_NET / PEER_IP / CLIENT_IP / LAN_CIDR
  (defaults 10.13.13.0/24, .1, .2, 192.168.1.0/24) and passes them through
  to the in-container bootstrap
- install.sh generates a placeholder /etc/wireguard/wg0.conf from those
  env vars instead of copying the static example, and updates PEER_IP in
  wirecon.conf on first install
- install.sh always enables + starts wg-quick, watchdog, monitor and
  (if WIRECON_WEB_AUTOSTART=yes, default yes) the web UI, even before
  keys are filled in — wg-quick will fail until then, and the web UI
  is the way to finish configuration
- apk installs busybox-extras and wirecon-web now runs /usr/sbin/httpd
  (fixes "httpd: applet not found" on base busybox)
- create-lxc.sh drops its own web-UI start block (install.sh owns it)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 19:41:44 +02:00

27 lines
742 B
Plaintext
Executable File

#!/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="/usr/sbin/httpd"
command_args="-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
}