aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsleepwalk7
1 files changed, 7 insertions, 0 deletions
diff --git a/sleepwalk b/sleepwalk
index cdb93cd..edb2d16 100755
--- a/sleepwalk
+++ b/sleepwalk
@@ -42,6 +42,8 @@ start_deep_sleep() {
sleep 5 # Give some extra time for pending output data
if [ can_suspend ]; then
+ WIFI_WAS_ON=$(nmcli r wifi)
+ nmcli r wifi off
echo mem > /sys/power/state 2>/dev/null
fi
@@ -210,6 +212,11 @@ if [ "$1" == "start" ]; then
break
fi
done
+
+ if [ "$WIFI_WAS_ON" = "enabled" ]; then
+ nmcli r wifi on
+ fi
+
wait_for_notifications
done
elif [ "$1" == "stop" ]; then