Skip to content

Instantly share code, notes, and snippets.

@moraisaugusto
Last active November 14, 2020 15:10
Show Gist options
  • Save moraisaugusto/81153ad6aaced083dec44880743b5c2e to your computer and use it in GitHub Desktop.
Save moraisaugusto/81153ad6aaced083dec44880743b5c2e to your computer and use it in GitHub Desktop.
wake up wifi when sleep
#!/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