Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env sh
- hour=$(date +%H)
- dev=/sys/devices/platform/leds-gpio/leds/tp-link:blue:system
- echo phy0rx > $dev/trigger
- if [ $hour -ge 22 ]; then
- echo 'turn off led'
- echo 0 > $dev/brightness
- else
- echo 'turn on led'
- echo 225 > $dev/brightness
- fi
- # */5 * * * * /bin/sh /root/led
- # /etc/init.d/cron start
- # /etc/init.d/cron enable
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement