forked from cloudflare/Cloudflare-CPanel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloudflare.uninstall.sh
More file actions
executable file
·33 lines (22 loc) · 926 Bytes
/
Copy pathcloudflare.uninstall.sh
File metadata and controls
executable file
·33 lines (22 loc) · 926 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
#
# Uninstall script for CloudFlare cPanel plugin
#
INSTALL_DIR="/usr/local/cpanel"
# Get PHP Version
CPANELSUPPORTEDPHPPATH=`ls -al $INSTALL_DIR/3rdparty/bin/php | awk '{print $11}'`
PHPVERSION=`echo $CPANELSUPPORTEDPHPPATH | rev | cut -d '/' -f 3 | rev`
rm -rf $INSTALL_DIR/base/frontend/paper_lantern/cloudflare
rm -rf $INSTALL_DIR/bin/admin/CloudFlare
rm -rf $INSTALL_DIR/3rdparty/php/$PHPVERSION/lib/php/cloudflare
rm -rf $INSTALL_DIR/Cpanel/API/CloudFlare.pm
rm -rf /root/.cpanel/datastore/cf_api
rm -rf $INSTALL_DIR/bin/admin/CloudFlare
rm -rf $INSTALL_DIR/bin/cloudflare_update.sh
rm -f $INSTALL_DIR/base/frontend/paper_lantern/dynamicui/dynamicui_cloudflare*.conf
## Remove post update call
cfonupgrade=`grep -F "cloudflare_update" /scripts/postupcp`
if [ "$cfonupgrade" != "" ]; then
sed -i '/cloudflare_update.sh/d' /scripts/postupcp
fi
echo "Cloudflare cPanel plugin has been uninstalled."