Created
June 11, 2013 22:11
-
-
Save quirkey/5761212 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Bandwidth throttling for OSX, | |
# http://www.macosxhints.com/article.php?story=20080119112509736 | |
case "$1" in | |
'start') | |
KB=$2 | |
echo Throttling at $KB Kbytes/s | |
sudo ipfw pipe 1 config bw "$KB"KByte/s | |
sudo ipfw add 1 pipe 1 src-port 80 | |
;; | |
'stop') | |
sudo ipfw delete 1 | |
;; | |
esac | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment