Skip to content

Instantly share code, notes, and snippets.

@foosel

foosel/README.md Secret

Last active May 7, 2020 14:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save foosel/d8316f939a5b51f58954d78b41ba1b0e to your computer and use it in GitHub Desktop.
Save foosel/d8316f939a5b51f58954d78b41ba1b0e to your computer and use it in GitHub Desktop.

Files:

/root/scripts/wireless_power_off:

#!/bin/sh -
iwconfig wlan0 power off

/etc/systemd/system/wireless_power_off.service:

[Unit]
Description=Disable WiFi Power Management
After=multi-user.target

[Service]
Type=idle
ExecStart=/root/scripts/wireless_power_off

[Install]
WantedBy=multi-user.target

Commands:

sudo chmod +x /root/scripts/wireless_power_off
sudo chmod 644 /etc/systemd/system/wireless_power_off.service
sudo systemctl daemon-reload
sudo systemctl enable wireless_power_off.service
sudo reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment