From 14e19177af8e89677fb8b528cbc764b41cedbb88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristhian=20Mart=C3=ADnez=20Ochoa?= Date: Fri, 26 Oct 2018 22:03:48 -0600 Subject: [PATCH] site command improved - argument empty error fixed - cache option install plugins with wrong permissions fixed --- lib/sites | 2 ++ plugins/site | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/sites b/lib/sites index 5e36516..c20d535 100644 --- a/lib/sites +++ b/lib/sites @@ -38,6 +38,8 @@ wp_cache_plugins() { else echo "${red}Redis Object Cache Plugin is already installed!${end}" fi + + sudo chown -R www-data:www-data /var/www/$domain/htdocs/wp-content/plugins } domain_check() { diff --git a/plugins/site b/plugins/site index e7b07db..f958578 100644 --- a/plugins/site +++ b/plugins/site @@ -124,7 +124,7 @@ if [[ "$domain" == "-list" && -z "$type" && -z "$cache" ]]; then for site in "/var/www"/* do domi=$(echo $site | cut -f 4 -d "/") - echo "${gre} - $domi ${end}" + [[ $domi != "html" && $domi != $(conf_read tools-port) ]] && echo "${gre} - $domi ${end}" done echo "" @@ -365,6 +365,7 @@ elif [[ "$type" == "-force-redirect" && -a /etc/nginx/sites-available/$domain ]] elif [[ ! -a /etc/nginx/sites-available/$domain && $type =~ ^(-nocache|-cache|-delete|-off|-on|-ssl-on|-ssl-off|-force-redirect)$ ]]; then echo "${red}Site $domain doesn't exists!${end}" else + [[ -z $type ]] && type=$domain echo "${red} Argument '${type}' is not a valid option! ${end}" fi