summaryrefslogtreecommitdiff
path: root/recipes/mini-httpd/files
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/mini-httpd/files
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/mini-httpd/files')
-rw-r--r--recipes/mini-httpd/files/init70
-rw-r--r--recipes/mini-httpd/files/mini-httpd.conf37
-rw-r--r--recipes/mini-httpd/files/new-bindir-mandir.patch15
-rw-r--r--recipes/mini-httpd/files/remove-CC.patch13
4 files changed, 135 insertions, 0 deletions
diff --git a/recipes/mini-httpd/files/init b/recipes/mini-httpd/files/init
new file mode 100644
index 0000000000..5e9b176eb9
--- /dev/null
+++ b/recipes/mini-httpd/files/init
@@ -0,0 +1,70 @@
+#! /bin/sh
+
+# Globals
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/mini_httpd
+NAME=mini-httpd
+DESC="web server"
+# Additional options that are passed to the Daemon.
+DAEMON_OPTS="-C /etc/mini-httpd.conf"
+
+test -x $DAEMON || exit 0
+
+# Include mini-httpd defaults if available
+if [ -f /etc/default/mini-httpd ]
+then
+ . /etc/default/mini-httpd
+fi
+
+set -e
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: "
+ start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
+ --exec $DAEMON -- $DAEMON_OPTS
+ echo "$NAME."
+ ;;
+
+ stop)
+ echo -n "Stopping $DESC: "
+ # Get pid number
+ if [ -e /var/run/$NAME.pid ]
+ then
+ PID=`cat /var/run/$NAME.pid`
+ if [ -d /proc/$PID ]
+ then
+ start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid
+ else
+ # we need to remove the pidfile manually
+ if [ -e /var/run/$NAME.pid ]
+ then
+ rm -f /var/run/$NAME.pid
+ fi
+ fi
+ fi
+ echo "$NAME."
+ ;;
+
+ restart|force-reload)
+ echo -n "Restarting $DESC: "
+ if [ "$START" = "0" ]
+ then
+ start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
+ --exec $DAEMON -- $DAEMON_OPTS
+ fi
+ sleep 1
+ start-stop-daemon --start --quiet --pidfile \
+ /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
+ echo "$NAME."
+ ;;
+
+ *)
+ N=/etc/init.d/$NAME
+ echo "Usage: $N {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
diff --git a/recipes/mini-httpd/files/mini-httpd.conf b/recipes/mini-httpd/files/mini-httpd.conf
new file mode 100644
index 0000000000..cb4150c3d9
--- /dev/null
+++ b/recipes/mini-httpd/files/mini-httpd.conf
@@ -0,0 +1,37 @@
+# Example config for mini_httpd.
+# Author: Marvin Stark <marv@der-marv.de>
+
+# Uncomment this line for turning on ssl support.
+#ssl
+
+# On which host mini_httpd should bind?
+host=0.0.0.0
+
+# On which port mini_httpd should listen?
+port=80
+
+# Which user mini_httpd should use?
+user=nobody
+
+# Run in chroot mode?
+#chroot # yes
+nochroot # no
+
+# Working directory of mini_httpd.
+#dir=<work_dir>
+
+# We are the web files stored?
+data_dir=/etc/mini-httpd
+
+# Which certificate to use?
+#certfile=<certfile>
+
+# Which logfile to use?
+logfile=/var/log/mini-httpd.log
+
+# Which pidfile to use?
+pidfile=/var/run/mini-httpd.pid
+
+# Which charset to use?
+charset=iso-8859-1
+
diff --git a/recipes/mini-httpd/files/new-bindir-mandir.patch b/recipes/mini-httpd/files/new-bindir-mandir.patch
new file mode 100644
index 0000000000..7d48cd1685
--- /dev/null
+++ b/recipes/mini-httpd/files/new-bindir-mandir.patch
@@ -0,0 +1,15 @@
+diff -NurpP --minimal mini_httpd-1.19/Makefile mini_httpd-1.19-new/Makefile
+--- mini_httpd-1.19/Makefile 2002-11-02 07:02:57.000000000 +0800
++++ mini_httpd-1.19-new/Makefile 2008-10-06 15:43:52.000000000 +0800
+@@ -20,8 +20,8 @@ CRYPT_LIB = -lcrypt
+ #SSL_LIBS = -L${SSL_TREE}/lib -lssl -lcrypto
+
+
+-BINDIR = /usr/local/sbin
+-MANDIR = /usr/local/man
++BINDIR = /usr/sbin
++MANDIR = /usr/share/man
+ CC = gcc
+ CDEFS = ${SSL_DEFS} ${SSL_INC}
+ CFLAGS = -O ${CDEFS}
+
diff --git a/recipes/mini-httpd/files/remove-CC.patch b/recipes/mini-httpd/files/remove-CC.patch
new file mode 100644
index 0000000000..0fddcd7cb6
--- /dev/null
+++ b/recipes/mini-httpd/files/remove-CC.patch
@@ -0,0 +1,13 @@
+diff -NurpP --minimal mini_httpd-1.19/Makefile mini_httpd-1.19-new/Makefile
+--- mini_httpd-1.19/Makefile 2008-10-06 15:45:44.000000000 +0800
++++ mini_httpd-1.19-new/Makefile 2008-10-06 15:46:11.000000000 +0800
+@@ -22,7 +22,7 @@ CRYPT_LIB = -lcrypt
+
+ BINDIR = /usr/sbin
+ MANDIR = /usr/share/man
+-CC = gcc
++#CC = gcc
+ CDEFS = ${SSL_DEFS} ${SSL_INC}
+ CFLAGS = -O ${CDEFS}
+ #CFLAGS = -g ${CDEFS}
+