Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

biggest change was to make entering a master domain name possible #3

Merged
merged 8 commits into from Feb 14, 2012

Conversation

chesty
Copy link
Contributor

@chesty chesty commented Feb 13, 2012

they aren't split very well :(

@theckman
Copy link
Owner

Domain search does not work:

➜  gapps-linode-dns git:(master) ./gapps-linode-dns.sh
####################
#  Google Apps MX  #
# Records Creation #
#      Script      #
####################

Enter API key: [redacted]

Enter your master domain name: umad-b.ro

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   879    0   879    0     0   3040      0 --:--:-- --:--:-- --:--:--  3756
Domain not found

@theckman
Copy link
Owner

I even tried a domain without a hyphen in the middle:

➜  gapps-linode-dns git:(master) ./gapps-linode-dns.sh
####################
#  Google Apps MX  #
# Records Creation #
#      Script      #
####################

Enter API key: [redacted]

Enter your master domain name: timheckman.net

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   879    0   879    0     0   2769      0 --:--:-- --:--:-- --:--:--  3354
Domain not found

I'm running this on OS X and it does not use Gnu sed. I'm guessing that's where the problem comes in. This would also mean this script would break on the BSDs as well (I would imagine)

@theckman
Copy link
Owner

I've confirmed that it's because your changes are built around Gnu sed.

@theckman
Copy link
Owner

Still no good on the version of sed that comes with OS X.

Edit: Still works with GNU Sed, however.

@chesty
Copy link
Contributor Author

chesty commented Feb 14, 2012

export GDOMAIN=timheckman.net
wget -qO- 'https://api.linode.com/?api_key=urmomwearsarmyboots\&api_responseformat=json\&api_action=domain.list' | sed 's/."DOMAINID":([0-9]+),."DOMAIN":"'"${GDOMAIN}"'".*/\1/'

what happens?

@theckman
Copy link
Owner

 sed: 1: "s/."DOMAINID":([0-9]+), ...": \1 not defined in the RE

@chesty
Copy link
Contributor Author

chesty commented Feb 14, 2012

the cut and paste didn't work, it lost some characters, a few backslashes, a few asterisks :(
maybe cut and paste from the code?

@theckman
Copy link
Owner

It spits out the entire JSON response from the API

@theckman
Copy link
Owner

Tested ability for script to find domain on the following operating systems:

OS X 10.7.3
Debian 6.0

Marking as complete and initiating pull request! Thanks both of you!

theckman pushed a commit that referenced this pull request Feb 14, 2012
Clean up code and make the ability to search by domain name instead of specifying DomainID
@theckman theckman merged commit 90231aa into theckman:master Feb 14, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants