Code: Select all
root@Gargoyle:~/scripts# cat mon_bwmon.sh
#!/bin/sh
if [[ "$(bw_get -i total5-upload-day-365 2>&1 | cut -c 0-125 )" == "ERROR: Bandwidth query failed, make sure rule with specified id exists, and that you are performing only one query at a time." ]]; then
/etc/init.d/bwmon_gargoyle start;
fi
Code: Select all
*/10 * * * * /root/scripts/mon_bwmon.sh