Skip to content

Commit

Permalink
db-delete-all fixed
Browse files Browse the repository at this point in the history
Infinite loop caused by background process
  • Loading branch information
QROkes committed Nov 2, 2018
1 parent 71f7714 commit c3365e5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/general
Expand Up @@ -35,7 +35,7 @@ db_delete() {
if [[ ! -d /etc/mysql || $(conf_read mysql) != "true" || $(conf_read mysql-client) != "true" ]]; then
echo "${red}[ERROR] Seems like MySQL is not installed or Webinoly can not detect it!"
echo " - Database can not be deleted -${blu} $domain ${end}"
exit 1
return
fi
local ROOT_PASS=$( echo $(conf_read mysql-root) | openssl enc -d -a -salt )
sudo mysql --connect-timeout=10 --user=root -p$ROOT_PASS -e "$dbsetup"
Expand Down
2 changes: 1 addition & 1 deletion lib/sites
Expand Up @@ -470,7 +470,7 @@ deletesite() {
fi
fi

[[ $dbdel == [yY] ]] && db_delete $domain &
[[ $dbdel == [yY] ]] && db_delete $domain

# Delete site files
sudo rm /etc/nginx/sites-available/$domain
Expand Down
2 changes: 1 addition & 1 deletion plugins/site
Expand Up @@ -141,7 +141,7 @@ elif [[ "$domain" == "-delete-all" && -z "$type" && -z "$cache" ]]; then
# List sites then will be deleted
if [[ $domi != "html" && $domi != $(conf_read tools-port) ]]; then
# Determina if site is WP (so has DB to delete)
[[ -a $site/wp-config.php || -a $site/htdocs/wp-config.php ]] && db_delete $domi &
[[ -a $site/wp-config.php || -a $site/htdocs/wp-config.php ]] && db_delete $domi

sudo rm -rf /etc/nginx/sites-available/$domi
sudo rm -rf /etc/nginx/sites-enabled/$domi
Expand Down

0 comments on commit c3365e5

Please sign in to comment.