blue-merle/files/etc/gl-switch.d/sim.sh
Tobias Mueller 843ddf9e7d switch: attempt to react to the hardware button
I don't know whether this works. On the v4 firmware, we can see files in
/etc/gl-switch.d but I don't know yet how the system determines which
file to choose. I assume it's dependend on the "page" of the display.
But I haven't figured out yet how or rather where those pages are
organised.
2023-10-16 12:14:00 +02:00

15 lines
220 B
Bash

#!/bin/sh
action=$1
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