aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-support/obexpush/files/init
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2011-07-24 17:57:24 +0100
committerPaul Eggleton <paul.eggleton@linux.intel.com>2011-07-30 02:35:12 +0100
commite9b45ff67d32fdc27950a51135b6dabada8334e7 (patch)
treede99cd760c8292ee1dd334e23e1e5cc43e90dfbd /recipes-support/obexpush/files/init
downloadmeta-opie-e9b45ff67d32fdc27950a51135b6dabada8334e7.tar.gz
meta-opie-e9b45ff67d32fdc27950a51135b6dabada8334e7.tar.bz2
meta-opie-e9b45ff67d32fdc27950a51135b6dabada8334e7.zip
initial commit of meta-opie
Populate the repository with files from OpenEmbedded at revision 45edf621296daf150c72b876d720861235e5762e - no changes, only rearranged the directory structure to match the new oe-core style and added COPYING.MIT and README. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'recipes-support/obexpush/files/init')
-rw-r--r--recipes-support/obexpush/files/init44
1 files changed, 44 insertions, 0 deletions
diff --git a/recipes-support/obexpush/files/init b/recipes-support/obexpush/files/init
new file mode 100644
index 0000000..a9891ef
--- /dev/null
+++ b/recipes-support/obexpush/files/init
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# Start or stop the OBEX Push daemon.
+#
+# Written by Michael Haynie <mbhaynie@zoominternet.net>
+#
+# It might be better to just edit the bluetooth script,
+# since opd depends heavily on it.
+#
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+[ -f /etc/default/rcS ] && . /etc/default/rcS
+[ -f /etc/default/opd_args ] && . /etc/default/opd_args
+
+case "$1" in
+ start)
+ echo -n "Starting the OBEX Push daemon: "
+ start-stop-daemon -S -x /usr/sbin/opd -- --daemonize $OPD_ARGS
+ if [ $? = 0 ]; then
+ echo "opd."
+ else
+ echo "(failed.)"
+ fi
+ ;;
+ stop)
+ echo -n "Stopping the OBEX Push daemon: "
+ start-stop-daemon -K \
+ -x /usr/sbin/opd
+ echo "opd."
+ ;;
+ restart|force-reload)
+ $0 stop
+ $0 start
+ exit
+ ;;
+ *)
+ echo "Usage: " $0 " {start|stop|restart|force-reload}"
+ exit 1
+ ;;
+esac
+
+exit 0
+