Howto: Let the LED indicate ongoing backup jobs
Posted: 03 Mar 2013, 06:54
I just hacked this simple solution to let the LED indicate if a backup job, either duplicity or rsync, is executing or not.
If you find it useful, use it, share it and maybe reply to this thread.
If you find room for improvement please post your version below.
If you have suggestions or questions... guess what to do.
/home/whatever_user/bin/led_color.sh
In /etc/crontab
If you find it useful, use it, share it and maybe reply to this thread.
If you find room for improvement please post your version below.
If you have suggestions or questions... guess what to do.
/home/whatever_user/bin/led_color.sh
Code: Select all
#!/bin/bash
if (( `ps axu|egrep "duplicity|rsync"|grep -v egrep|grep -v daemon|wc -l` >0)); then echo "1";else echo "0";fi > /sys/bus/platform/devices/bubbatwo/color
Code: Select all
#LED
#----------
# m h dom mon dow user command
*/1 * * * * root /home/whatever_user/bin/led_color.sh