Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/haad/proxychains.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas R Colkitt <douglas.colkitt@gmail.com>2019-04-13 18:48:24 +0300
committerDouglas R Colkitt <douglas.colkitt@gmail.com>2019-04-13 18:48:24 +0300
commit0416c2b7eada21a61a8be54e5a17bf09da878ada (patch)
treed6b28c01008eba7e08024825485c90fa4e6f4ce0
parent98e9326534adcf8e20b67d0c979deef621736fff (diff)
Fix issue with POSIX portability in proxyresolv script
-rwxr-xr-xsrc/proxyresolv5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/proxyresolv b/src/proxyresolv
index eccf882..e1674b4 100755
--- a/src/proxyresolv
+++ b/src/proxyresolv
@@ -3,13 +3,12 @@
# DNS server used to resolve names
-if [[ -z "$PROXY_DNS_SERVER" ]] ; then
+if [ -z "$PROXY_DNS_SERVER" ] ; then
DNS_SERVER=208.67.222.222 # OpenDNS
else
DNS_SERVER=$PROXY_DNS_SERVER
fi
-
if [ $# = 0 ] ; then
echo " usage:"
echo " proxyresolv <hostname> "
@@ -17,7 +16,7 @@ if [ $# = 0 ] ; then
fi
awk 'BEGIN{ARGC=0} {for(i=2;i<=NF;i++){if($i==ARGV[1] && $1!~":"){print $1;found=1}} } END{exit found?0:1}' "$1" </etc/hosts
-if [[ "$?" -eq "0" ]]; then
+if [ "$?" -eq "0" ]; then
exit
fi