web-tools deprecated

Purge Web-Tools feature has been deprecated.
This commit is contained in:
Cristhian Martínez Ochoa 2018-06-22 16:15:03 -06:00
parent c00f4602d2
commit f0078b3914
3 changed files with 6 additions and 51 deletions

View file

@ -368,7 +368,6 @@ nginx_tool() {
# Install LetsEncrypt
sudo apt-get -y install letsencrypt
conf_write web-tool true
conf_write nginx-tool true
api-events_update in10
}
@ -413,7 +412,6 @@ php_tool() {
sudo apt-get -y install postfix
sudo service php*-fpm reload
conf_write web-tool true
conf_write php-tool true
api-events_update ip8
}

View file

@ -213,26 +213,22 @@ webinoly_verify() {
fi
# Web Tools
if [[ ! -d /etc/redis && $(conf_read web-tool) == "true" && $(conf_read php_tool) == "true" ]]; then
if [[ ! -d /etc/redis && $(conf_read php_tool) == "true" ]]; then
echo "[ERROR] Folder: /etc/redis not found!"
error="1"
fi
if [[ ! -d /etc/postfix && $(conf_read web-tool) == "true" && $(conf_read php_tool) == "true" ]]; then
if [[ ! -d /etc/postfix && $(conf_read php_tool) == "true" ]]; then
echo "[ERROR] Folder: /etc/postfix not found!"
error="1"
fi
if [[ ! -a /usr/bin/duplicity && $(conf_read web-tool) == "true" && $(conf_read nginx_tool) == "true" ]]; then
if [[ ! -a /usr/bin/duplicity && $(conf_read nginx_tool) == "true" ]]; then
echo "[ERROR] File: /usr/bin/duplicity not found!"
error="1"
fi
if [[ ! -a /usr/bin/letsencrypt && $(conf_read web-tool) == "true" && $(conf_read nginx_tool) == "true" ]]; then
if [[ ! -a /usr/bin/letsencrypt && $(conf_read nginx_tool) == "true" ]]; then
echo "[ERROR] File: /usr/bin/letsencrypt not found!"
error="1"
fi
if [[ ( -d /etc/redis || -d /etc/postfix || -a /usr/bin/duplicity || -a /usr/bin/letsencrypt ) && $(conf_read web-tool) != "true" ]]; then
echo "[WARNING] Seems like Web Tools (Redis, Letsencrypt, Postfix and Duplicity) are enabled but Webinoly can not detect it!"
warning="1"
fi
echo ""
@ -340,9 +336,6 @@ config_load() {
stack -pma
fi
if [[ $(conf_load_read web-tool) == "purged" ]]; then
stack -web-tools -purge
fi
# Some user preferences
if [[ -n $(conf_load_read tools-port) ]]; then

View file

@ -2,7 +2,7 @@
# Server Stack Manager
# Syntax: stack <option> <arguments>
# Options: -html, -nginx, -php, -lemp, -mysql, -pma, -info, -purge-server-all, -web-tools, -php-ver
# Options: -html, -nginx, -php, -lemp, -mysql, -pma, -info, -purge-server-all, -php-ver
# Arguments: -purge, -notools, -noptim
source /opt/webinoly/lib/install
@ -105,7 +105,6 @@ elif [[ $arg == "-purge" && ( $opt == "-html" || $opt == "-nginx" ) ]]; then
api-events_update pn6
linux_purge
[[ $(conf_read php-tool) != "true" ]] && conf_write web-tool purged
conf_write nginx purged
conf_write nginx-optim purged
conf_write nginx-tool purged
@ -165,7 +164,6 @@ elif [[ $arg == "-purge" && $opt == "-php" ]]; then
conf_write php-tool purged
fi
[[ $(conf_read nginx-tool) != "true" ]] && conf_write web-tool purged
echo ""
echo "${gre}PHP has been deleted successfully! ${end}"
echo ""
@ -279,41 +277,7 @@ elif [[ $arg == "-purge" && $opt == "-pma" ]]; then
fi
echo ""
api-events_update pm3
elif [[ $arg == "-purge" && $opt == "-web-tools" ]]; then
if [[ $(conf_read web-tool) != "true" ]]; then
echo "${red} Web Tools (Postfix, Redis, Memcached, Duplicity and Letsencrypt) are not installed, hence can not be deleted! ${end}"
clear_force_flag
exit 0
fi
echo ""
echo "${red} ¡ C A U T I O N ! You are about to remove all your Web Tools (Postfix, Redis, Memcached, Duplicity and Letsencrypt) from your server! ${end}"
echo ""
if [[ $(conf_read force-flag) != "true" ]]; then
echo " ${blu} Are you sure [y/N]? ${end} "
while read -r -n 1 -s answer; do
answer=${answer:-n}
[[ $answer = [YyNn] ]] && break
done
fi
if [[ $answer == [Yy] || $(conf_read force-flag) == "true" ]]; then
[[ $(conf_read nginx-tool) == "true" ]] && sudo apt-get -y purge letsencrypt python-boto duplicity duply
[[ $(conf_read php-tool) == "true" ]] && sudo apt-get -y purge redis-server php-redis postfix php-memcached php-memcache memcached
sudo apt-get -y autoremove
conf_write web-tool purged
echo ""
echo "${gre}Web Tools have been deleted successfully! ${end}"
echo ""
else
echo ""
echo " ${gre} Action aborted!!! ${end}"
echo ""
fi
echo ""
elif [[ $arg == "-purge" && $opt == "-lemp" ]]; then
echo ""
echo "${red}If you want to remove Webinoly Stack completely from your server use the '-purge-server-all' option or remove each package individually. ${end}"