Don't busyloop when fifo file is missing

This commit is contained in:
Sandro - 2023-12-26 00:16:02 +01:00
parent ab941d3770
commit 868e492014
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 5 additions and 0 deletions

View File

@ -6,6 +6,11 @@ INTERVAL=60
[ -p /tmp/usteer-info ] || mkfifo /tmp/usteer-info
while true; do
if [ ! -p /tmp/usteer-info ]; then
echo "/tmp/usteer-info went missing!"
exit 1
fi
DATA="$(cat /tmp/usteer-info)"
cd /sys/class/net
for iface in wlan*; do