30 lines
702 B
Bash
Executable file
30 lines
702 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
# Colors for text lines
|
|
GREEN='\033[0;32m'
|
|
YELLOW='\033[1;33m'
|
|
RED='\033[0;31m'
|
|
NC='\033[0m'
|
|
|
|
# Check if executer is root
|
|
if [ "$EUID" -ne 0 ]; then
|
|
echo -e "${RED}Please run as root!"
|
|
exit
|
|
fi
|
|
|
|
echo -e "${RED}Be aware that this script removes the config and webroot files from your system!"
|
|
echo -e "They can't be recovered!"
|
|
echo -e "Use it only if you understand, what this script doing!"
|
|
echo -e "${YELLOW}Do you want to continue and remove your site?${NC}"
|
|
|
|
while true; do
|
|
read -p "(y/n): " SURE
|
|
case ${SURE} in
|
|
[Yy]* )
|
|
break;;
|
|
[Nn]* )
|
|
exit 0
|
|
;;
|
|
* ) echo "Please answer y[es] or n[o].";;
|
|
esac
|
|
done
|