blob: ee61802358ab52f3d8394a0ac19aaa7ae681ec8d (
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
34
35
|
#!/bin/bash
#
# Start/stop/restart iwd.
iwd_start() {
if [ -x /usr/libexec/iwd ]; then
echo "Starting iwd: /usr/libexec/iwd"
/usr/libexec/iwd 2>/dev/null &
fi
}
iwd_stop() {
echo "Stopping iwd"
killall iwd
}
iwd_restart() {
iwd_stop
sleep 1
iwd_start
}
case "$1" in
'start')
iwd_start
;;
'stop')
iwd_stop
;;
'restart')
iwd_restart
;;
*)
echo "usage $0 start|stop|restart"
esac
|