Skip to content

Instantly share code, notes, and snippets.

@nitely
Created October 23, 2015 00:14
Show Gist options
  • Save nitely/3d5f10b4f686f5f96c95 to your computer and use it in GitHub Desktop.
Save nitely/3d5f10b4f686f5f96c95 to your computer and use it in GitHub Desktop.
Ubuntu +15.04 systemd restart network after resume
# sudo nano /lib/systemd/system/nm-resume.service
# sudo systemctl enable nm-resume.service
[Unit]
Description=Restart NetworkManager at resume
After=suspend.target
After=hibernate.target
After=hybrid-sleep.target
[Service]
ExecStart=/bin/systemctl --no-block restart NetworkManager.service
[Install]
WantedBy=suspend.target
WantedBy=hibernate.target
WantedBy=hybrid-sleep.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment