flectra/addons/point_of_sale/tools/posbox/configuration/led_status.sh
flectra-admin 769eafb483 [INIT] Inception of Flectra from Odoo
Flectra is Forked from Odoo v11 commit : (6135e82d73)
2018-01-16 11:45:59 +05:30

20 lines
345 B
Bash
Executable File

#!/usr/bin/env bash
set_brightness() {
echo "${1}" > /sys/class/leds/led0/brightness
}
check_status_loop() {
while true ; do
if wget --quiet localhost:8069/hw_proxy/hello -O /dev/null ; then
set_brightness 255
else
set_brightness 0
fi
sleep 5
done
}
echo none > /sys/class/leds/led0/trigger
check_status_loop