backlight.sh:
#! /bin/bash
echo -e "33[36m-----------BACKLIGHT--------------33[0m"
echo -e "33[1;32mPress Esc to turn off the backlight33[0m"
./continue.sh
echo 0 > /sys/class/backlight/backlight/brightness
echo -e "33[1;32mPress Esc to turn on the backlight33[0m"
./continue.sh
echo 6 > /sys/class/backlight/backlight/brightness
echo "Please enter y/n"
read -sn 1 read_check
if [ ! -n $read_check ]
then
exit 0
elif [ "$read_check" = "y" ]
then
echo -e "33[1;32mBACKLIGHT OK33[0m"
else
echo -e "33[1;31mBACKLIGHT ERR33[0m"
fi
root@ELF1:~# chmod 777 backlight.sh
root@ELF1:~# ./backlight.sh
閱讀全文