Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Host name with no prefix breaks some commands #20

Closed
drodrig opened this Issue · 1 comment

2 participants

drodrig Nick
drodrig

This command works:
./rsdns-a.sh -n www.domain.com -i 1.1.1.1 -t 300 -U

This command does does not (note the absent prefix from the host name):
./rsdns-a.sh -n domain.com -i 1.1.1.1 -t 300 -U

Instead, it returns:
"Domain com not found."

I added this to lib/func.sh (get_domain() - line 97):

    97       # Added to account for domains like "this.com" (with no host prefix).
98 DOTCOUNT=`grep -o -e '\\.' <<<$1 | wc -l `
99 if [ $DOTCOUNT -eq 1 ]
100 then
101 HOST=$1
102 DOMAIN=$1
103 return
104 fi

Now the above command seems to work. I'm not a shell programmer and I didn't test thoroughly, so I probably broke something else :-).

Nick
Owner

I think this was fixed by issue #2 .... I'll update the REAME.md.

Nick linickx referenced this issue from a commit
Nick Update README.md, issue #20
Added an additional A record example, doesn't fix #20 but acknowledges that it's the most common problem. The script ideally needs some better error handling.
4e582a2
Nick linickx closed this issue from a commit
Nick Update README.md, issue #20
Added an additional A record example, doesn't fix #20 but acknowledges that it's the most common problem. The script ideally needs some better error handling.
4e582a2
Nick linickx closed this in 4e582a2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.