summaryrefslogtreecommitdiff
path: root/network/connman/rc.connmand
blob: cac2087cfa7a0335f43ac5fe74f6e266b4bca2a9 (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
30
31
32
33
#!/bin/sh
# Start/stop/restart the connman daemon.

connmand_start() {
  if [ -x /usr/sbin/connmand ]; then
    echo "Starting connman daemon: /usr/sbin/connmand "
    /usr/sbin/connmand
  fi
}

connmand_stop() {
  killall connmand 2> /dev/null
}

connmand_restart() {
  connmand_stop
  sleep 1
  connmand_start
}

case "$1" in
'start')
  connmand_start
  ;;
'stop')
  connmand_stop
  ;;
'restart')
  connmand_restart
  ;;
*)
  echo "usage $0 start|stop|restart"
esac