wok view connman/stuff/etc/init.d/connman @ rev 22302

updated xorg-xwininfo (1.1.2 -> 1.1.5)
author Hans-G?nter Theisgen
date Wed Nov 13 17:11:58 2019 +0100 (2019-11-13)
parents 7f188676b59c
children
line source
1 #!/bin/sh
2 # /etc/init.d/connman : Start, stop and restart the connection manager
3 # on SliTaz, at boot time or with the command line.
4 #
5 # To start the connection manager at boot time, just put connman in the
6 # $RUN_DAEMONS variable of /etc/rcS.conf and configure options with
7 # /etc/daemons.conf
8 #
10 # Connmand start fails if dbus-daemon is not running.
11 [ -n "$(pidof dbus-daemon)" ] || /etc/init.d/dbus start
13 . /etc/init.d/rc.functions
14 . /etc/daemons.conf
16 NAME=Connman
17 DESC="$(_ 'Connection Manager')"
18 DAEMON=connmand
19 OPTIONS=$CONNMAN_OPTIONS
20 PIDFILE="$(pidof $DAEMON)"
22 case "$1" in
23 start)
24 if [ -n "$PIDFILE" ] ; then
25 _ '%s is already running.' $NAME
26 exit 1
27 fi
28 pkill udhcpc 2>/dev/null
29 action 'Starting %s: %s...' "$DESC" $NAME
30 $DAEMON $OPTIONS
31 status
32 ;;
33 stop)
34 if [ -z "$PIDFILE" ] ; then
35 _ '%s is not running.' $NAME
36 exit 1
37 fi
38 action 'Stopping %s: %s...' "$DESC" $NAME
39 pkill $DAEMON
40 pkill wpa_supplicant
41 status
42 ;;
43 restart)
44 if [ -z "$PIDFILE" ] ; then
45 _ '%s is not running.' $NAME
46 exit 1
47 fi
48 action 'Restarting %s: %s...' "$DESC" $NAME
49 pkill $DAEMON &&
50 pkill wpa_supplicant &&
51 sleep 2 &&
52 $DAEMON $OPTIONS
53 status
54 ;;
55 status)
56 if [ -n "$PIDFILE" ] ; then
57 _ '%s is running.' $NAME
58 else
59 _ '%s is not running.' $NAME
60 fi
61 ;;
62 *)
63 emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart|status]"
64 newline
65 ;;
66 esac
68 exit 0