Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[Unit]
Description=Wireless network connectivity (%i)
Wants=network.target
Before=network.target
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/rfkill unblock all
ExecStart=/usr/bin/ip l set %i up
ExecStart=/usr/bin/wpa_supplicant -B -i %i -c /etc/wpa_supplicant/wpa_supplicant-%i.conf
ExecStart=/usr/bin/dhcpcd %i
ExecStop=/usr/bin/ip l set %i down
ExecStop=/usr/bin/ip a flush %i
ExecStop=/usr/bin/ip r flush %i
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.