asterisk-misc/ring_mon/set-light
2022-03-04 02:35:29 +01:00

18 rader
376 B
Bash
Executable file

#!/bin/sh
set -eu
if [ "$DEVICE_NUMBER" = 0 ]; then
[ "$1" = on ] && exec numlockx on
[ "$1" = off ] && exec numlockx off
elif [ "$DEVICE_NUMBER" = 1 ]; then
[ "$1" = on ] && exec xset led named "Scroll Lock"
[ "$1" = off ] && exec xset -led named "Scroll Lock"
else
echo "Device number not supported" >&2
exit 2
fi
echo "Invalid usage" >&2
exit 2