User Tools

Site Tools


mldonkey_speed_limit

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
mldonkey_speed_limit [2007/12/09 03:57]
kyxap
mldonkey_speed_limit [2007/12/09 05:55]
kyxap
Line 8: Line 8:
  
 Собственно,​ сам скрипт:​ Собственно,​ сам скрипт:​
- +<code bash> 
-  #!/bin/sh +#!/bin/sh 
-  NC="/​bin/​nc"​ +NC="/​bin/​nc"​ 
-  HOUR=`/​bin/​date +'​%H'​` +HOUR=`/​bin/​date +'​%H'​` 
-  case "​$HOUR"​ in +case "​$HOUR"​ in 
-      08) +    08) 
-  sh -c "$NC 127.0.0.1 4000 <<​EOF +sh -c "$NC 127.0.0.1 4000 <<​EOF 
-  set max_hard_download_rate 200 +set max_hard_download_rate 200 
-  set max_hard_upload_rate 350 +set max_hard_upload_rate 350 
-  +
-  EOF" > /dev/null +EOF" > /dev/null 
-      ;; +    ;; 
-      16) +    16) 
-  sh -c "$NC 127.0.0.1 4000 <<​EOF +sh -c "$NC 127.0.0.1 4000 <<​EOF 
-  set max_hard_download_rate 100 +set max_hard_download_rate 100 
-  set max_hard_upload_rate 250 +set max_hard_upload_rate 250 
-  +
-  EOF" > /dev/null +EOF" > /dev/null 
-      ;; +    ;; 
-      23) +    23) 
-  sh -c "$NC 127.0.0.1 4000 <<​EOF +sh -c "$NC 127.0.0.1 4000 <<​EOF 
-  set max_hard_download_rate 400 +set max_hard_download_rate 400 
-  set max_hard_upload_rate 500 +set max_hard_upload_rate 500 
-  +
-  EOF" > /dev/null +EOF" > /dev/null 
-      ;; +    ;; 
-      *) +    *) 
-      exit; +    exit; 
-      ;; +    ;; 
-  esac+esac 
 +</​code>​
mldonkey_speed_limit.txt · Last modified: 2013/12/15 17:05 by kyxap