Mini Shell
Direktori : /proc/self/root/bin/ |
|
Current File : //proc/self/root/bin/clwpos-erase |
#!/usr/bin/bash
# clwpos-erase Utility to uninstall Cloudlinux WP Optimization tool
#
# Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2020 All Rights Reserved
#
# Licensed under CLOUD LINUX LICENSE AGREEMENT
# http://cloudlinux.com/docs/LICENSE.TXT
yesno()
# $1 = Message prompt
# Returns ans=0 for no, ans=1 for yes
{
ans=2
while [ $ans -eq 2 ]
do
echo -n "Do you want to $1 (y/n)? " ; read reply
case "$reply" in
[yY][eE][sS]|[yY]) ans=1 ;;
[nN][oO]|[nN]) ans=0 ;;
*) echo "Please answer yes or no" ;;
esac
done
}
yesno 'disable and uninstall AccelerateWP for all domains ?'
if [ $ans -eq 0 ]; then
echo 'Cancel'
exit 1
fi
echo "Uninstalling AccelerateWP hooks..."
/usr/share/cloudlinux/wpos/wpos_hooks.py --uninstall
echo "Uninstalling AccelerateWP cache for all domains..."
/usr/bin/clwpos-admin uninstall-cache-for-all-domains
echo "Turning of AccelerateWP suites..."
/usr/bin/clwpos-admin set-suite \
--disallowed-for-all \
--suites accelerate_wp,accelerate_wp_premium,accelerate_wp_cdn,accelerate_wp_cdn_pro
echo "Removing WordPress SmartAdvice plugins"
cl-smart-advice wordpress-plugin-install
echo 'Stop AccelerateWP daemon...'
/usr/bin/clwpos-daemon stop --graceful
Zerion Mini Shell 1.0