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

updated azpainter (2.0.4 -> 2.1.3)
author Hans-G?nter Theisgen
date Sat Feb 09 17:15:55 2019 +0100 (2019-02-09)
parents dec89a82ee60
children 1160f587fa15
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 #
9 . /etc/init.d/rc.functions
10 . /etc/daemons.conf
12 NAME=Connman
13 DESC="$(_ 'Connection Manager')"
14 DAEMON=connmand
15 OPTIONS=$CONNMAN_OPTIONS
16 PIDFILE="$(pidof $DAEMON)"
18 case "$1" in
19 start)
20 if [ -n "$PIDFILE" ] ; then
21 _ '%s is already running.' $NAME
22 exit 1
23 fi
24 pkill udhcpc 2>/dev/null
25 action 'Starting %s: %s...' "$DESC" $NAME
26 $DAEMON $OPTIONS
27 status
28 ;;
29 stop)
30 if [ -z "$PIDFILE" ] ; then
31 _ '%s is not running.' $NAME
32 exit 1
33 fi
34 action 'Stopping %s: %s...' "$DESC" $NAME
35 pkill $DAEMON
36 pkill wpa_supplicant
37 status
38 ;;
39 restart)
40 if [ -z "$PIDFILE" ] ; then
41 _ '%s is not running.' $NAME
42 exit 1
43 fi
44 action 'Restarting %s: %s...' "$DESC" $NAME
45 pkill $DAEMON &&
46 pkill wpa_supplicant &&
47 sleep 2 &&
48 $DAEMON $OPTIONS
49 status
50 ;;
51 status)
52 if [ -n "$PIDFILE" ] ; then
53 _ '%s is running.' $NAME
54 else
55 _ '%s is not running.' $NAME
56 fi
57 ;;
58 *)
59 emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart|status]"
60 newline
61 ;;
62 esac
64 exit 0