Comment 24 for bug 1576747

Revision history for this message
Ebrael (ebraelshaddai) wrote :

I just tested a simple script (called "network_restar") to make NM restart upon resume... and IT HAS WORKED!

Rather than creating it via terminal right into the relative folder (/lib/systemd/system-sleep), I did it thru text editor, saved it in Home and moved it to that folder as sudo.

>> Script content:

case "${1}" in
  resume|thaw)
    sudo service network-manager restart
;;
esac

>> After this, run (line by line, supposing you have saved script your Home dir):

sudo su
(type your root password!)

mv network_restart /lib/systemd/system-sleep

chmod +x /lib/systemd/system-sleep/network_restart

>> Script seen on: http://askubuntu.com/questions/766718/script-to-restart-network-manager-after-resume-from-sleep