diff options
author | Michael Lauer <mickey@vanille-media.de> | 2005-08-21 22:59:04 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2005-08-21 22:59:04 +0000 |
commit | 84f9415eeac99317f70785939a9f139feba4736f (patch) | |
tree | 6cf6619cc7194d87a339cf909cba152645ea9d21 /packages/obexpush/files | |
parent | 58960b40d7be51c5c696ba61ae9301ebb4b86be7 (diff) |
obexpush: add patch for obextool
Diffstat (limited to 'packages/obexpush/files')
-rw-r--r-- | packages/obexpush/files/init | 55 |
1 files changed, 35 insertions, 20 deletions
diff --git a/packages/obexpush/files/init b/packages/obexpush/files/init index ac1fd62ead..a9891ef8ad 100644 --- a/packages/obexpush/files/init +++ b/packages/obexpush/files/init @@ -1,29 +1,44 @@ #!/bin/sh # -# /etc/init.d/obd: start or stop the OBEX Push helper daemon +# 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. # -PARAMS="--mode OBEX --channel 10 --path /tmp/opd --sdp --metadata" +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 OBEX Push helper: opd" - opd $PARAMS & - ;; - stop) - echo -n "Shutting down OBEX Push helper: opd" - killall opd - ;; - restart|force-reload) - echo -n "Restarting OBEX Push helper: opd" - killall opd - sleep 2 - obd $PARAMS & - ;; - *) - echo "Usage: /etc/init.d/obd {start|stop|restart|force-reload}" - exit 1 - ;; + 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 + |