diff options
Diffstat (limited to 'recipes/obexpush/files')
-rw-r--r-- | recipes/obexpush/files/init | 44 | ||||
-rw-r--r-- | recipes/obexpush/files/opd_args | 1 |
2 files changed, 45 insertions, 0 deletions
diff --git a/recipes/obexpush/files/init b/recipes/obexpush/files/init new file mode 100644 index 0000000000..a9891ef8ad --- /dev/null +++ b/recipes/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 + diff --git a/recipes/obexpush/files/opd_args b/recipes/obexpush/files/opd_args new file mode 100644 index 0000000000..26afc0e249 --- /dev/null +++ b/recipes/obexpush/files/opd_args @@ -0,0 +1 @@ +OPD_ARGS="--mode OBEX --path /var/obexpush --channel 10 --sdp --metadata" |