summaryrefslogtreecommitdiff
path: root/scripts/mini_httpd.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/mini_httpd.sh')
-rwxr-xr-xscripts/mini_httpd.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/mini_httpd.sh b/scripts/mini_httpd.sh
new file mode 100755
index 0000000..0dde12e
--- /dev/null
+++ b/scripts/mini_httpd.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+#
+# mini_httpd.sh - startup script for mini_httpd on FreeBSD
+#
+# This goes in /usr/local/etc/rc.d and gets run at boot-time.
+
+case "$1" in
+
+ start)
+ if [ -x /usr/local/sbin/mini_httpd_wrapper ] ; then
+ echo -n " mini_httpd"
+ /usr/local/sbin/mini_httpd_wrapper &
+ fi
+ ;;
+
+ stop)
+ kill -USR1 `cat /var/run/mini_httpd.pid`
+ ;;
+
+ *)
+ echo "usage: $0 { start | stop }" >&2
+ exit 1
+ ;;
+
+esac