Last active
November 14, 2020 15:10
-
-
Save moraisaugusto/81153ad6aaced083dec44880743b5c2e to your computer and use it in GitHub Desktop.
wake up wifi when sleep
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# this file will reconnect the wifi when you wake up you OS (tested on Arch) | |
# save this file /usr/lib/systemd/system-sleep | |
case $1 in | |
pre) | |
# unload the modules before going to sleep | |
;; | |
post) | |
sleep 2 | |
systemctl restart wpa_supplicant.service | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment