summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox/files/busybox-httpd
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2014-10-16 03:05:19 +0200
committerTudor Florea <tudor.florea@enea.com>2014-10-16 03:05:19 +0200
commitc527fd1f14c27855a37f2e8ac5346ce8d940ced2 (patch)
treebb002c1fdf011c41dbd2f0927bed23ecb5f83c97 /meta/recipes-core/busybox/files/busybox-httpd
downloadpoky-daisy-140929.tar.gz
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-core/busybox/files/busybox-httpd')
-rwxr-xr-xmeta/recipes-core/busybox/files/busybox-httpd44
1 files changed, 44 insertions, 0 deletions
diff --git a/meta/recipes-core/busybox/files/busybox-httpd b/meta/recipes-core/busybox/files/busybox-httpd
new file mode 100755
index 0000000000..c8348e54a7
--- /dev/null
+++ b/meta/recipes-core/busybox/files/busybox-httpd
@@ -0,0 +1,44 @@
1#!/bin/sh
2DAEMON=/usr/sbin/httpd
3NAME=httpd
4DESC="Busybox HTTP Daemon"
5HTTPROOT="/srv/www"
6ARGS="-h $HTTPROOT"
7
8test -f $DAEMON || exit 0
9
10set -e
11
12case "$1" in
13 start)
14 echo -n "starting $DESC: $NAME... "
15 if [ ! -d $HTTPROOT ]; then
16 echo "$HTTPROOT is missing."
17 exit 1
18 fi
19 start-stop-daemon -S -b -n $NAME -a $DAEMON -- $ARGS
20 echo "done."
21 ;;
22 stop)
23 echo -n "stopping $DESC: $NAME... "
24 start-stop-daemon -K -n $NAME
25 echo "done."
26 ;;
27 restart)
28 echo "restarting $DESC: $NAME... "
29 $0 stop
30 $0 start
31 echo "done."
32 ;;
33 reload)
34 echo -n "reloading $DESC: $NAME... "
35 killall -HUP $(basename ${DAEMON})
36 echo "done."
37 ;;
38 *)
39 echo "Usage: $0 {start|stop|restart|reload}"
40 exit 1
41 ;;
42esac
43
44exit 0