diff options
| author | Anton Bobov <abobov@gmail.com> | 2012-01-30 20:45:23 +0600 |
|---|---|---|
| committer | Anton Bobov <abobov@gmail.com> | 2012-01-30 20:45:23 +0600 |
| commit | 5eb3384f04442becef4ca74ee51efed3a755ffd1 (patch) | |
| tree | 1f89d4626088f70251597269da345fc9da766aa2 /setup_proxy | |
Initial commit.
Diffstat (limited to 'setup_proxy')
| -rwxr-xr-x | setup_proxy | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/setup_proxy b/setup_proxy new file mode 100755 index 0000000..f707ac0 --- /dev/null +++ b/setup_proxy @@ -0,0 +1,15 @@ +#!/bin/bash + +gconftool=gconftool-2 + +http_proxy= +no_proxy= + +if [[ 'true' = "$($gconftool -g /system/http_proxy/use_http_proxy)" ]] ; then + host=$($gconftool -g /system/http_proxy/host) + port=$($gconftool -g /system/http_proxy/port) + http_proxy=http://$host:$port/ + no_proxy=$($gconftool -g /system/http_proxy/ignore_hosts | tr -d '[]') +fi + +echo http_proxy no_proxy |
