#!/bin/bash
while true; do
# If driver is unloaded, stop.
[[ -d /sys/devices/platform/mts-io ]] || exit 0
fuser /dev/spidev0.0 > /dev/null
if [ $? == 0 ]; then
mts-io-sysfs store led-lora 1 >/dev/null 2>&1
else
mts-io-sysfs store led-lora 0 >/dev/null 2>&1
fi
sleep 5
done