Skip to content
This repository has been archived by the owner on Jun 22, 2022. It is now read-only.

Pass Array as Parameter #2

Open
smyth64 opened this issue Apr 17, 2015 · 4 comments
Open

Pass Array as Parameter #2

smyth64 opened this issue Apr 17, 2015 · 4 comments

Comments

@smyth64
Copy link

smyth64 commented Apr 17, 2015

I tried everything but I don't know how to pass an array to the script!

My goal was to create a DNS Entry:

./bin/ispconfig-cli dnsCnameAdd 2 zone=2,name=test
./bin/ispconfig-cli dnsCnameAdd 2 [zone=2][name=test]

I tried so many ways but nothing works... Hope somebody can help me!

@cjsewell
Copy link
Contributor

Hi there,

try
./bin/ispconfig-cli dnsCnameAdd 2 "{'zone':2,'name':'test'}"

Sorry its not very well documented!

@smyth64
Copy link
Author

smyth64 commented Apr 29, 2015

Hello cjsewell,
Thank you for your answer!

I tried following:
ispconfig-cli dnsCnameAdd 6 "{'zone':2,'name':'subdomain', data:'www'}"

Where "6" is the customer ID the dns Entry belongs to.

Unfortunately in phpmyadmin I only see this:
image

And the CLI command give me this output:
image

Do you have any idea what I missed?

Best Regards,
Michael

@smyth64
Copy link
Author

smyth64 commented Apr 29, 2015

OK I had a little mistake in it:
I forgot the single quotes at "data".

ispconfig-cli dnsCnameAdd 6 "{'zone':2,'name':'subdomain','data':'www'}"

Anyway.... Now I get this error. Failed
image

@smyth64
Copy link
Author

smyth64 commented May 1, 2015

The verbose output says
" Cannot use object of type stdClass as array"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants