summaryrefslogtreecommitdiff
path: root/roles/ws/minet/templates/connections/horstWireless.j2
blob: c6d04b7e0f7077807bb46aa87d95af96d54e62a8 (plain) (blame)
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
#!/bin/sh

SHORT_NAME="horstwireless"
DESC_NAME="horst WIRELESS"
INTERFACE="mon0"
MODULE_NAME="{{ ws_minet_wireless_interface_module }}"

. /usr/local/lib/minet/minet_helpers.sh

case "$1" in
  start|"")
    echo "Connecting with $DESC_NAME"
    activate_interface wlan0 $MODULE_NAME
    iw dev wlan0 del
    iw phy phy0 interface add $INTERFACE type monitor
    xfce4-terminal --maximize -x horst -i $INTERFACE
    ;;
  stop)
    echo "Disconnecting from $DESC_NAME"
    deactivate_interface $INTERFACE $MODULE_NAME
    ;;
  *)
    exit 1
    ;;
esac