Changes between Version 2 and Version 3 of Scripts/Scheduler


Ignore:
Timestamp:
Dec 16, 2008, 11:00:03 PM (12 years ago)
Author:
Waldorf
Comment:

thx wereHamster and jhujhiti for the feedback!

Legend:

Unmodified
Added
Removed
Modified
  • Scripts/Scheduler

    v2 v3  
    3030#############################################
    3131time=$(date +%H)
    32 if [ $tr_auth ]; then
     32if [ -n "$tr_auth" ]; then
    3333    tr_auth="--auth=$tr_auth"
    3434fi
    3535
    36 if [[ $time -ge 1 ] -a [ $time -lt 10 ]]; then
     36if [[ $time -ge $start_time && $time -lt $end_time ]]; then
    3737    /usr/local/bin/transmission-remote "$tr_host $tr_auth $limited_speed" > /dev/null
    38     if [ $verbose ]; then date "+%Y-%m-%d (%H:%M:%S) Transmission speed limit changed"; fi
     38    if [ -n "$verbose" ]; then date "+%Y-%m-%d (%H:%M:%S) Transmission speed limit changed"; fi
    3939else
    4040    /usr/local/bin/transmission-remote "$tr_host $tr_auth $normal_speed" > /dev/null
    41     if [ $verbose ]; then date "+%Y-%m-%d (%H:%M:%S) Transmission speed limit changed"; fi
     41    if [ -n "$verbose" ]; then date "+%Y-%m-%d (%H:%M:%S) Transmission speed limit changed"; fi
    4242fi
    4343