From adc5ab8c83bea7706a9872293eaf7a06e4ebceca Mon Sep 17 00:00:00 2001 From: craigerl Date: Mon, 8 Jan 2024 09:40:05 -0800 Subject: [PATCH] auto hotspot script --- usr/local/bin/digihotspot.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 usr/local/bin/digihotspot.sh diff --git a/usr/local/bin/digihotspot.sh b/usr/local/bin/digihotspot.sh new file mode 100755 index 0000000..0f58fd8 --- /dev/null +++ b/usr/local/bin/digihotspot.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +echo "Auto-hotspot checking network status." + +STATUS=`cat /sys/class/net/wlan0/operstate` + +if [ $STATUS = "down" -o $STATUS = "dormant" ]; then + echo "Wifi network is down, enabling hot spot mode." + nmcli connection up hotspot +fi +