Ubuntu Pastebin

Paste from leftyfb at Fri, 19 May 2017 19:26:30 +0000

Download as text
 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
36
37
38
39
40
41
# Setup wpasupplicant (Wireless)
echo "\n### Set wpasupplicant (Wireless) ###\n"
ssid=<somessid>
wpakey=<somereallygoodpassword>
countrycode=US
WIFACE=<your wireless interface>

echo "ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0

ap_scan=1
fast_reauth=1
country=$countrycode
filter_ssids=1
okc=1

network={
  ssid=\"$ssid\"
  psk=\"$wpakey\"
}" > /etc/wpa_supplicant/wpa_supplicant.conf

# Fix wpa_supplicant service to start only after wireless interface
echo "\n### Fix wpa_supplicant service to start only after wireless interface ###\n"
echo "[Unit]
Description=WPA supplicant
Before=network.target
BindsTo=sys-subsystem-net-devices-$WIFACE.device
After=sys-subsystem-net-devices-$WIFACE.device

[Service]
Type=dbus
BusName=fi.epitest.hostap.WPASupplicant
ExecStart=/sbin/wpa_supplicant -s -u -O /run/wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -i $WIFACE

[Install]
WantedBy=multi-user.target
Alias=dbus-fi.epitest.hostap.WPASupplicant.service" > /lib/systemd/system/wpa_supplicant.service

# Enable wpa_supplicant service on boot
echo "\n### Enable wpa_supplicant service on boot ###\n"
systemctl enable wpa_supplicant.service
Download as text