]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/obexpush/files/init
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / obexpush / files / init
1 #!/bin/sh
2 #
3 # Start or stop the OBEX Push daemon.
4 #
5 # Written by Michael Haynie <mbhaynie@zoominternet.net>
6 #
7 # It might be better to just edit the bluetooth script, 
8 # since opd depends heavily on it.
9 #
10
11 PATH=/bin:/usr/bin:/sbin:/usr/sbin
12
13 [ -f /etc/default/rcS ] && . /etc/default/rcS
14 [ -f /etc/default/opd_args ] && . /etc/default/opd_args
15
16 case "$1" in
17     start)
18         echo -n "Starting the OBEX Push daemon: "
19         start-stop-daemon -S -x /usr/sbin/opd -- --daemonize $OPD_ARGS
20         if [ $? = 0 ]; then
21             echo "opd."
22         else
23             echo "(failed.)"
24         fi
25         ;;
26     stop)
27         echo -n "Stopping the OBEX Push daemon: "
28         start-stop-daemon -K \
29                 -x /usr/sbin/opd
30         echo "opd."
31         ;;
32     restart|force-reload)
33         $0 stop
34         $0 start
35         exit
36         ;;
37     *)
38         echo "Usage: " $0 " {start|stop|restart|force-reload}"
39         exit 1
40         ;;
41 esac
42
43 exit 0
44