Advertisement
Guest User

Untitled

a guest
Sep 24th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. # Create a script to disable networking devices on suspend
  2. `sudo -e /usr/lib/systemd/system-sleep/disable-networking.sh`
  3.  
  4. ```
  5. #!/bin/sh
  6. case $1/$2 in
  7. pre/*)
  8. nmcli networking off
  9. echo "Going to $2..."
  10. ;;
  11. post/*)
  12. nmcli networking on
  13. echo "Waking up from $2..."
  14. ;;
  15. esac
  16. ```
  17.  
  18. ### Make the script executable
  19. `sudo chmod a+x /usr/lib/systemd/system-sleep/disable-networking.sh`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement