blue-merle/files/etc/gl-switch.d/sim.sh
Tobias Mueller ce77151081 switch: log action on the toggle
It's a bit easier to follow than looking at the generated files.
2023-10-16 16:03:11 +02:00

17 lines
282 B
Bash

#!/bin/sh
action=$1
logger -p notice -t blue-merle-toggle "Called... ${action}"
if [ "$action" = "on" ];then
echo "on" > /tmp/sim_change_switch
elif [ "$action" = "off" ];then
echo "off" > /tmp/sim_change_switch
else
echo "off" > /tmp/sim_change_switch
fi
sleep 1