|
2 | 2 |
|
3 | 3 | # Webinoly Server Manager Plugin
|
4 | 4 | # Syntax: webinoly <option> <argument>
|
5 |
| -# Options: -update, -server-reset, -verify, -dbpass, -tools-port, -login-www-data, -cache-valid, -uninstall, -info, -external-sources-update, -clear-cache, -version, -blockip, -conf-value_, -default-site, -tools-site, -mysql-password, -smtp, -backup, -aws-s3-credentials, -db-import, -send-to-s3, -custom-headers, -skip-cache, -skip-cookie-cache, -query-string-cache, -query-string-never-cache, -email, -export, -import, -mysql-public-access |
6 |
| -# Arguments: -raw, -profile, -list, -bucket, -source, -delete, -run, -restore, -wp, -destination, -date, -s3-european-buckets, info, -file, -add-db-pre, -no-recovery, -recalculate, -dbname, -skip-db, -filename, -overwrite |
| 5 | +# Options: -update, -server-reset, -verify, -dbpass, -tools-port, -login-www-data, -cache-valid, -uninstall, -info, -external-sources-update, -clear-cache, -version, -blockip, -dynvar, -default-site, -tools-site, -mysql-password, -smtp, -backup, -aws-s3-credentials, -db-import, -send-to-s3, -custom-headers, -skip-cache, -skip-cookie-cache, -query-string-cache, -query-string-never-cache, -email, -export, -import, -mysql-public-access |
| 6 | +# Arguments: -raw, -profile, -list, -bucket, -source, -delete, -run, -restore, -wp, -destination, -date, -s3-european-buckets, info, -file, -add-db-pre, -no-recovery, -recalculate, -dbname, -skip-db, -filename, -overwrite, -value |
7 | 7 |
|
8 | 8 | source /opt/webinoly/lib/webin
|
9 | 9 | source /opt/webinoly/lib/datadog
|
@@ -113,12 +113,12 @@ elif [[ -n $blockip ]]; then
|
113 | 113 | nginx_blockip
|
114 | 114 |
|
115 | 115 |
|
116 |
| -elif [[ -n $conf_value ]]; then |
117 |
| - if [[ -n $dyn_var && $dyn_var =~ ^[A-Za-z\-]+$ ]]; then |
118 |
| - [[ $conf_value == "NeverMatchString" ]] && read -p "${blu}Enter a value for '${dyn_var}': ${end}" conf_value |
119 |
| - if [[ -n $conf_value ]]; then |
120 |
| - conf_write $dyn_var $conf_value |
121 |
| - echo "${gre}Configuration successfully updated!${end}" |
| 116 | +elif [[ -n $dynvar ]]; then |
| 117 | + if [[ -n $dynvar && $dynvar =~ ^[A-Za-z\-]+$ ]]; then |
| 118 | + [[ -z $value ]] && read -p "${blu}Enter a value for '${dynvar}': ${end}" value |
| 119 | + if [[ -n $value ]]; then |
| 120 | + conf_write $dynvar "$value" |
| 121 | + echo "${gre}Configuration successfully updated! ${dim}(${dynvar}:$(conf_read $dynvar))${end}" # Retrive the value to really be sure! |
122 | 122 | else
|
123 | 123 | echo "${red}[ERROR] Please, enter a valid value!${end}"
|
124 | 124 | exit 1
|
|
0 commit comments