site command improved
- argument empty error fixed - cache option install plugins with wrong permissions fixed
This commit is contained in:
parent
ce1f8d21a9
commit
14e19177af
|
@ -38,6 +38,8 @@ wp_cache_plugins() {
|
||||||
else
|
else
|
||||||
echo "${red}Redis Object Cache Plugin is already installed!${end}"
|
echo "${red}Redis Object Cache Plugin is already installed!${end}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
sudo chown -R www-data:www-data /var/www/$domain/htdocs/wp-content/plugins
|
||||||
}
|
}
|
||||||
|
|
||||||
domain_check() {
|
domain_check() {
|
||||||
|
|
|
@ -124,7 +124,7 @@ if [[ "$domain" == "-list" && -z "$type" && -z "$cache" ]]; then
|
||||||
for site in "/var/www"/*
|
for site in "/var/www"/*
|
||||||
do
|
do
|
||||||
domi=$(echo $site | cut -f 4 -d "/")
|
domi=$(echo $site | cut -f 4 -d "/")
|
||||||
echo "${gre} - $domi ${end}"
|
[[ $domi != "html" && $domi != $(conf_read tools-port) ]] && echo "${gre} - $domi ${end}"
|
||||||
done
|
done
|
||||||
echo ""
|
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
|
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}"
|
echo "${red}Site $domain doesn't exists!${end}"
|
||||||
else
|
else
|
||||||
|
[[ -z $type ]] && type=$domain
|
||||||
echo "${red} Argument '${type}' is not a valid option! ${end}"
|
echo "${red} Argument '${type}' is not a valid option! ${end}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue