aboutsummaryrefslogtreecommitdiffstats
path: root/community/dnscrypt-proxy/dnscrypt-proxy.setup
diff options
context:
space:
mode:
Diffstat (limited to 'community/dnscrypt-proxy/dnscrypt-proxy.setup')
-rwxr-xr-x[-rw-r--r--]community/dnscrypt-proxy/dnscrypt-proxy.setup12
1 files changed, 6 insertions, 6 deletions
diff --git a/community/dnscrypt-proxy/dnscrypt-proxy.setup b/community/dnscrypt-proxy/dnscrypt-proxy.setup
index 8feeae88408..5ccdad84113 100644..100755
--- a/community/dnscrypt-proxy/dnscrypt-proxy.setup
+++ b/community/dnscrypt-proxy/dnscrypt-proxy.setup
@@ -50,7 +50,7 @@ while :
do
read RESTART
# Sanitize input
- export RESTART_CLEAN="`echo "${RESTART}" | tr -cd '[:[alnum]:]'`"
+ export RESTART_CLEAN="`echo "${RESTART}" | tr -cd '[[:alnum:]]'`"
if [ ! $RESTART ] ;then
RESTART_CLEAN=eth0
@@ -83,7 +83,7 @@ while :
do
read IP
# Sanitize input
- export IP_CLEAN="`echo "${IP}" | tr -cd '[:xdigit:] [:\::] [:\.:]'`"
+ export IP_CLEAN="`echo "${IP}" | tr -cd '[[:xdigit:]] [:] [.]'`"
if [ ! $IP ]; then
IP_CLEAN=$defaultip
fi
@@ -109,7 +109,7 @@ while :
do
read DNSPORT
# Sanitize input to an integer and assign to new variable
- export DNSPORT_CLEAN="`echo "${DNSPORT}" | tr -cd '[:[0-9]:]'`"
+ export DNSPORT_CLEAN="`echo "${DNSPORT}" | tr -cd '[0-9]'`"
if [ ! $DNSPORT ]; then
DNSPORT_CLEAN=$defaultport
fi
@@ -242,9 +242,9 @@ print_green "$colourline"
tmpfile=$(mktemp)
-cat $output | awk 'BEGIN{FS=""}{gsub(/,\ /,"\ "); print}' | tail -n +2 > $tmpfile
+cat $output | awk 'BEGIN{FS=""}{gsub(/," " /," "); print}' | tail -n +2 > $tmpfile
-awk -F"\," 'BEGIN {format="%-8s%-35s%-30s%-10s%-10s%-10s%-25s\n"}{ printf format, "\["NR"\]",$1,$4,$8,$9,$10,$11}' $tmpfile
+awk -F"," 'BEGIN {format="%-8s%-35s%-30s%-10s%-10s%-10s%-25s\n"}{ printf format, "["NR"]",$1,$4,$8,$9,$10,$11}' $tmpfile
print_green "$colourline"
print_question "Please choose a DNS Resolver for dnscrypt-proxy to query:" "[1 - $totalservers]"
@@ -255,7 +255,7 @@ while :
do
read DNS
# Sanitize input to an integer
- export DNS_CLEAN="`echo "${DNS}" | tr -cd '[:[0-9]:]'`"
+ export DNS_CLEAN="`echo "${DNS}" | tr -cd '[0-9]'`"
if [ $DNS_CLEAN -gt 0 2>/dev/null ] && [ $DNS_CLEAN -le $totalservers 2>/dev/null ]; then
break