blob: a021fd465588c41cc2e2d1edca7aed583f86297f [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001#!/bin/sh
2
3DAEMON=/usr/sbin/connmand
4PIDFILE=/var/run/connmand.pid
5DESC="Connection Manager"
6
7if [ -f /etc/default/connman ] ; then
8 . /etc/default/connman
9fi
10
11set -e
12
Patrick Williamsc124f4f2015-09-15 14:41:29 -050013do_start() {
Patrick Williamsf1e5d692016-03-30 15:21:19 -050014 if [ -f @DATADIR@/connman/wired-setup ] ; then
15 . @DATADIR@/connman/wired-setup
Patrick Williamsc124f4f2015-09-15 14:41:29 -050016 fi
Andrew Geissler87f5cff2022-09-30 13:13:31 -050017 $DAEMON
Patrick Williamsc124f4f2015-09-15 14:41:29 -050018}
19
20do_stop() {
21 start-stop-daemon --stop --name connmand --quiet
22}
23
24case "$1" in
25 start)
26 echo "Starting $DESC"
27 do_start
28 ;;
29 stop)
30 echo "Stopping $DESC"
31 do_stop
32 ;;
33 restart|force-reload)
34 echo "Restarting $DESC"
35 do_stop
36 sleep 1
37 do_start
38 ;;
39 *)
40 echo "Usage: $0 {start|stop|restart|force-reload}" >&2
41 exit 1
42 ;;
43esac
44
45exit 0