Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Create a script to disable networking devices on suspend
- `sudo -e /usr/lib/systemd/system-sleep/disable-networking.sh`
- ```
- #!/bin/sh
- case $1/$2 in
- pre/*)
- nmcli networking off
- echo "Going to $2..."
- ;;
- post/*)
- nmcli networking on
- echo "Waking up from $2..."
- ;;
- esac
- ```
- ### Make the script executable
- `sudo chmod a+x /usr/lib/systemd/system-sleep/disable-networking.sh`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement