4
# Required-Start: $remote_fs $syslog dbus
5
# Required-Stop: $remote_fs $syslog dbus
6
# Default-Start: 2 3 4 5
8
# Short-Description: Connection Manager
12
DAEMON=/usr/sbin/connmand
13
DESC="Connection Manager"
16
. /lib/lsb/init-functions
18
if [ -f /etc/default/connman ] ; then
19
. /etc/default/connman
23
start-stop-daemon --start --oknodo --exec $DAEMON -- $DAEMON_OPTS
27
start-stop-daemon --stop --oknodo --quiet --exec $DAEMON
31
[ -n "$1" ] || return 0
32
[ -S /var/run/dbus/system_bus_socket ] || return 0
34
dbus-send --system --dest=org.freedesktop.DBus --print-reply \
35
/org/freedesktop/DBus org.freedesktop.DBus.GetConnectionUnixProcessID \
36
string:$1 2>/dev/null | awk '/uint32/ {print $2}'
41
log_daemon_msg "Starting $DESC"
46
log_daemon_msg "Stopping $DESC"
51
log_daemon_msg "Restarting $DESC"
58
pid=$(get_pid net.connman)
59
if [ -n "$pid" ]; then
60
log_success_msg "$NAME is running"
63
log_failure_msg "$NAME is not running"
64
return 3 # LSB exit code for "program is not running"
68
log_success_msg "Usage: $0 {start|stop|status|restart|force-reload}" >&2