#!/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 }