From c2ca8c73e1874c3c0a9c25cb5492f75018018fc1 Mon Sep 17 00:00:00 2001 From: Thayol Date: Thu, 24 Jul 2025 17:43:59 +0200 Subject: [PATCH] add note about FreeBSD --- README.md | 47 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 5b997e8..96bdcb3 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,32 @@ -# Busybox HTTPD SH Server - -A simple HTML templating SH solution that runs with just `httpd` and `sh` from `busybox`. - -*(Note: Alpine Linux now splits Busybox into multiple packages: `apk add busybox-extras`)* - -## Quickstart - -Run the command: - -```sh -busybox httpd -vv -fp 8080 -``` - -And then open `http://localhost:8080` in your browser. +# Busybox HTTPD SH Server + +A simple HTML templating SH solution that runs with just `httpd` and `sh` from `busybox`. + +*(Note: Alpine Linux now splits Busybox into multiple packages: `apk add busybox-extras`)* + +## Quickstart + +Run the command: + +```sh +busybox httpd -vv -fp 8080 +``` + +And then open `http://localhost:8080` in your browser. + +### FreeBSD + +The demo syntax used in the interpreter script is not compatible with FreeBSD's `sh`. +The following patch makes it use the default Busybox `ash` applet installed via `pkg install busybox`: + +```diff +diff --git a/interpreter.server_core_internal b/interpreter.server_core_internal +index 097f55f..604fe7f 100755 +--- a/interpreter.server_core_internal ++++ b/interpreter.server_core_internal +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/usr/local/bin/busybox ash + + server_core_internal_file="${1:-index.html}" +```