aboutsummaryrefslogtreecommitdiffstats
path: root/meta-filesystems/recipes-filesystems/owfs/owfs/owhttpd
diff options
context:
space:
mode:
Diffstat (limited to 'meta-filesystems/recipes-filesystems/owfs/owfs/owhttpd')
-rwxr-xr-xmeta-filesystems/recipes-filesystems/owfs/owfs/owhttpd60
1 files changed, 60 insertions, 0 deletions
diff --git a/meta-filesystems/recipes-filesystems/owfs/owfs/owhttpd b/meta-filesystems/recipes-filesystems/owfs/owfs/owhttpd
new file mode 100755
index 0000000000..5d74d13d9d
--- /dev/null
+++ b/meta-filesystems/recipes-filesystems/owfs/owfs/owhttpd
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+PATH=/sbin:/bin:/usr/bin
+
+DAEMON="owhttpd"
+
+test -f /usr/bin/${DAEMON} || exit 0
+
+if test -f /etc/default/${DAEMON} ; then
+. /etc/default/${DAEMON}
+else
+:
+fi
+
+if [ "$START_OWHTTPD" != "yes" ]
+then
+ exit 0
+fi
+
+
+startdaemon(){
+ echo -n "Starting ${DAEMON}: "
+ start-stop-daemon --start -x /usr/bin/${DAEMON} -- ${CMDLINE} --pid_file /var/run/${DAEMON}.pid
+ echo "done"
+}
+
+stopdaemon(){
+ echo -n "Stopping ${DAEMON}: "
+ start-stop-daemon --stop -p /var/run/${DAEMON}.pid
+ echo "done"
+}
+
+
+
+case "$1" in
+ start)
+ startdaemon
+ ;;
+ stop)
+ stopdaemon
+ ;;
+ force-reload)
+ stopdaemon
+ startdaemon
+ ;;
+ restart)
+ stopdaemon
+ startdaemon
+ ;;
+ reload)
+ stopdaemon
+ startdaemon
+ ;;
+ *)
+ echo "Usage: ${DAEMON} { start | stop | restart | reload }" >&2
+ exit 1
+ ;;
+esac
+
+exit 0