Browse Source
Update dns_cpanel.sh
_egrep_o used as suggested
pull/4173/head
Sandeep Mittal
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
dnsapi/dns_cpanel.sh
|
@ -120,7 +120,7 @@ _myget() { |
|
|
|
|
|
|
|
|
_get_root() { |
|
|
_get_root() { |
|
|
_myget 'json-api/cpanel?cpanel_jsonapi_apiversion=2&cpanel_jsonapi_module=ZoneEdit&cpanel_jsonapi_func=fetchzones' |
|
|
_myget 'json-api/cpanel?cpanel_jsonapi_apiversion=2&cpanel_jsonapi_module=ZoneEdit&cpanel_jsonapi_func=fetchzones' |
|
|
_domains=$(echo "$_result" | grep -oE '"[a-z0-9\.\-]*":\["; cPanel first' | cut -d':' -f1 | sed 's/"//g' | sed 's/{//g') |
|
|
|
|
|
|
|
|
_domains=$(echo "$_result" | _egrep_o '"[a-z0-9\.\-]*":\["; cPanel first' | cut -d':' -f1 | sed 's/"//g' | sed 's/{//g') |
|
|
_debug "_result is: $_result" |
|
|
_debug "_result is: $_result" |
|
|
_debug "_domains is: $_domains" |
|
|
_debug "_domains is: $_domains" |
|
|
if [ -z "$_domains" ]; then |
|
|
if [ -z "$_domains" ]; then |
|
|