List Directives via CLI

General discussion forum for the Zend Server

List Directives via CLI

Postby terr3089 on Thu Feb 02, 2017 1:21 pm

I am trying to do an automatic deploy of Zend Server 8.5 and I want to check the PHP directives from the command line.

I can get a list of extensions using zsmanage. I can store a directive but I can't seem to list the directives.

Is there a way of doing this without using the GUI

Thanks

Terry
terr3089
 
Posts: 14
Joined: Tue Sep 22, 2015 10:05 am

Re: List Directives via CLI

Postby zend_eyalt on Thu Feb 02, 2017 3:25 pm

you can get directives value via zs-client.sh, as in
Code: Select all
zs-client.sh configurationDirectivesList --zskey=<web-api-key> --zssecret=<webapi-secret> --zsurl=<url-for-the-webadmin-interface, by default: http://localhost:10081/>


If you want to get the output as json you can add --output-format=json. Another possibility, that is easier to parse from shell scripts is kv (stands for key-value)

Helpful information with explanation and example can be found by running:
Code: Select all
zs-client.sh configurationDirectivesList -h


So for instance to get all the directives of the date extension, you would run:
Code: Select all
zs-client.sh configurationDirectivesList --zskey=<web-api-key> --zssecret=<webapi-secret> --extension=date
User avatar
zend_eyalt
 
Posts: 245
Joined: Thu Jan 22, 2009 3:16 pm

Re: List Directives via CLI

Postby terr3089 on Wed Mar 15, 2017 5:11 pm

After many distractions. Got back to this today. Thanks for that. It worked well.
terr3089
 
Posts: 14
Joined: Tue Sep 22, 2015 10:05 am

Re: List Directives via CLI

Postby soph7549 on Thu Mar 16, 2017 10:43 am

Hey, this worked well in my case too. I'm glad you're reaching out to the customers - it's really important for us. Thanks and have a nice Thursday.
soph7549
 
Posts: 1
Joined: Thu Mar 16, 2017 10:32 am


Return to Zend Server

Who is online

Users browsing this forum: Google [Bot] and 4 guests

cron