Add files for deploying to sysmoBTS 2050

This commit is contained in:
Keith Whyte 2019-09-07 11:55:10 +02:00
parent be267a8857
commit 0b1ab8df7a
4 changed files with 80 additions and 0 deletions

View file

@ -0,0 +1,41 @@
#!/bin/bash
# Control the LED on a SysmoBTS 2050
# We have a Red and a Green LED in one
# Both on = Orange.
_AL=/sys/class/leds/activity_led/
_OL=/sys/class/leds/online_led/
_B=brightness
_T=trigger
_D=delay_on
_DO=delay_off
if [ "$1" == "green" -o "$1" == "g" ]; then
_L=$_AL
fi
if [ "$1" == "red" -o "$1" == "r" ]; then
_L=$_OL
fi
if [ "$1" == "reset" ]; then
echo 0 > $_AL$_B
echo 0 > $_OL$_B
fi
if [ "$2" == "on" ]; then
echo 1 > $_L$_B
fi
if [ "$2" == "off" ]; then
echo 0 > $_L$_B
fi
if [ "$2" == "timer" -o "$2" == "cpu0" ]; then
echo $2 > $_L$_T
if [ "$3" == fast ]; then
echo 50 > $_L$_D
echo 100 > $_L$_DO
fi
fi