-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall.sh
More file actions
60 lines (52 loc) · 1.79 KB
/
uninstall.sh
File metadata and controls
60 lines (52 loc) · 1.79 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/sh
# Color variables
RED='\033[0;31m'
GREEN='\033[0;32m'
PURPLE='\033[0;35m'
WHITE='\033[1;37m'
CYAN='\033[0;36m'
RESET='\033[0m'
# Check if the script is running as administrator
if [ "$(id -u)" != "0" ]; then
echo "${RED}» This script must be run as root! Restarting.."
# Restart with sudo
echo "${WHITE}"
sudo sh "$0" "$@"
fi
# Check if RevPanel is installed
if [ ! -f "/etc/revpanel/.env" ]; then
echo "${RED}» RevPanel is not installed!"
echo "${RED}» If you want to install RevPanel, please run the installer"
echo "${RESET}"
exit 1
fi
# Join the RevPanel folder
cd /etc/revpanel
# Print logo
echo "${PURPLE}"
cat << "EOF"
_______ _______ __
| \ | \ | \
| $$$$$$$\ ______ __ __ | $$$$$$$\ ______ _______ ______ | $$
| $$__| $$ / \| \ / \| $$__/ $$| \ | \ / \ | $$
| $$ $$| $$$$$$\\$$\ / $$| $$ $$ \$$$$$$\| $$$$$$$\| $$$$$$\| $$
| $$$$$$$\| $$ $$ \$$\ $$ | $$$$$$$ / $$| $$ | $$| $$ $$| $$
| $$ | $$| $$$$$$$$ \$$ $$ | $$ | $$$$$$$| $$ | $$| $$$$$$$$| $$
| $$ | $$ \$$ \ \$$$ | $$ \$$ $$| $$ | $$ \$$ \| $$
\$$ \$$ \$$$$$$$ \$ \$$ \$$$$$$$ \$$ \$$ \$$$$$$$ \$$
EOF
echo ""
echo ""
echo " ${GREEN}RevPanel Uninstaller v2.0.0"
# Stop the panel
echo "${CYAN}» Stopping the panel [1/2]"
sudo docker rm -f revpanel-postgres
pm2 stop revpanel-web revpanel-daemon
pm2 delete revpanel-web revpanel-daemon
pm2 save
echo "${GREEN}» Panel stopped [1/2]"
echo "${CYAN}» Uninstalling the panel [3/2]"
rm -rf /etc/revpanel
rm -rf /var/lib/revpanel
echo "${GREEN}» Panel successfully uninstalled [3/2]"
echo "${RESET}"