aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/freesmartphone/fsotdld
diff options
context:
space:
mode:
authorKlaus Kurzmann <mok@fluxnetz.de>2010-04-14 14:03:47 +0200
committerKlaus Kurzmann <mok@fluxnetz.de>2010-04-14 14:03:47 +0200
commit0204b15bb34dfa0abdaed0021c977d2890e240cc (patch)
treeeb30c5a493e515e3635d3ef32253681b1544bdbe /recipes/freesmartphone/fsotdld
parentc80e052a1532b7f8a10e1b19ceb4fb4086631d6f (diff)
downloadopenembedded-0204b15bb34dfa0abdaed0021c977d2890e240cc.tar.gz
fsotdld_git.bb: give it an initscript
Signed-off-by: Klaus Kurzmann <mok@fluxnetz.de>
Diffstat (limited to 'recipes/freesmartphone/fsotdld')
-rw-r--r--recipes/freesmartphone/fsotdld/fsotdld40
1 files changed, 40 insertions, 0 deletions
diff --git a/recipes/freesmartphone/fsotdld/fsotdld b/recipes/freesmartphone/fsotdld/fsotdld
new file mode 100644
index 0000000000..f43bf4c763
--- /dev/null
+++ b/recipes/freesmartphone/fsotdld/fsotdld
@@ -0,0 +1,40 @@
+#! /bin/sh
+#
+# fsotdld -- This shell script starts and stops the FSO2 device subsystem daemon.
+#
+# chkconfig: 345 90 20
+# description: fsotdld is the freesmartphone.org FSO2 time and location daemon
+# processname: fsotdld
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+NAME=fsotdld
+
+[ -f /etc/default/rcS ] && . /etc/default/rcS
+
+case "$1" in
+ start)
+ echo -n "Starting fsotdld: "
+ start-stop-daemon --start --pidfile /var/run/${NAME}.pid --make-pidfile --background -x /usr/sbin/fsotdld
+ if [ $? = 0 ]; then
+ echo "(ok)"
+ else
+ echo "(failed)"
+ fi
+ ;;
+ stop)
+ echo -n "Stopping fsotdld: "
+ start-stop-daemon --stop --pidfile /var/run/${NAME}.pid --oknodo
+ rm -f /var/run/${NAME}.pid
+ echo "(done)"
+ ;;
+ restart|force-reload)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "Usage: /etc/init.d/fsotdld {start|stop|restart|force-reload}"
+ exit 1
+ ;;
+esac
+
+exit 0