Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 42 additions & 4 deletions usr/local/sbin/easyengine
Original file line number Diff line number Diff line change
Expand Up @@ -1533,7 +1533,14 @@ REMOVEDB()
# Remove Database
# For Proper read Command Output
stty echo
read -p "Are You Sure To Drop $WPDBNAME Database (y/n): " ANSWER
if [ "$1" = "no-prompt" ]
then
# Assume yes
ANSWER="y"
else
# Ask user for confirmation
read -p "Are You Sure To Drop $WPDBNAME Database (y/n): " ANSWER
fi

if [ "$ANSWER" = "y" ]
then
Expand Down Expand Up @@ -1564,7 +1571,14 @@ REMOVEFILES()
# Remove Webroot
# For Proper read Command Output
stty echo
read -p "Are You Sure To Remove $DOMAIN Webroot (y/n): " ANSWER
if [ "$1" = "no-prompt" ]
then
# Assume yes
ANSWER="y"
else
# Ask user for confirmation
read -p "Are You Sure To Remove $DOMAIN Webroot (y/n): " ANSWER
fi

if [ "$ANSWER" = "y" ]
then
Expand All @@ -1581,8 +1595,14 @@ REMOVENGINXCONF()
# Remove Nginx Configuration
# For Proper read Command Output
stty echo
read -p "Are You Sure To Remove $DOMAIN Nginx Configuration (y/n): " ANSWER

if [ "$1" = "no-prompt" ]
then
# Assume yes
ANSWER="y"
else
# Ask user for confirmation
read -p "Are You Sure To Remove $DOMAIN Nginx Configuration (y/n): " ANSWER
fi
if [ "$ANSWER" = "y" ]
then
# Remove Webroot
Expand Down Expand Up @@ -2995,6 +3015,24 @@ then
# Reload Nginx
NGINXRELOAD

# Take Nginx Configuration In Git Version Control
EEGITDIR=/etc/nginx
EEGITMESSAGE="Delete Website With $SITEDELETEARG Option: $DOMAIN"
EEGITCOMMIT

elif [ "$SITEDELETEARG" = "--all-no-prompt" ]
then

# Remove All Database And Webroot
REMOVEDB "no-prompt"
REMOVEFILES "no-prompt"

# Remove Nginx Configuration
REMOVENGINXCONF "no-prompt"

# Reload Nginx
NGINXRELOAD

# Take Nginx Configuration In Git Version Control
EEGITDIR=/etc/nginx
EEGITMESSAGE="Delete Website With $SITEDELETEARG Option: $DOMAIN"
Expand Down