summaryrefslogtreecommitdiff
path: root/packages/obexpush/files/init
blob: ac1fd62ead34b7793d24c6d248935874c1165c37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
#
#   /etc/init.d/obd: start or stop the OBEX Push helper daemon
#

PARAMS="--mode OBEX --channel 10 --path /tmp/opd --sdp --metadata"

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
    ;;
esac

exit 0