delete site unattended
Now delete site command acept "force" option for unattended scripts.
This commit is contained in:
parent
448870d1bc
commit
4e26e73afe
14
lib/sites
14
lib/sites
|
@ -417,11 +417,15 @@ _EOF_
|
|||
deletesite() {
|
||||
# Determine if site is WP, so you should delete the DB too.
|
||||
if [[ -a /var/www/$domain/wp-config.php || -a /var/www/$domain/htdocs/wp-config.php ]]; then
|
||||
echo "${blu}Delete Database [Y/n]?${end}"
|
||||
while read -r -n 1 -s dbdel; do
|
||||
local dbdel=${dbdel:-y}
|
||||
[[ $dbdel = [YyNn] ]] && break
|
||||
done
|
||||
if [[ $value != "force" ]]; then
|
||||
echo "${blu}Delete Database [Y/n]?${end}"
|
||||
while read -r -n 1 -s dbdel; do
|
||||
local dbdel=${dbdel:-y}
|
||||
[[ $dbdel = [YyNn] ]] && break
|
||||
done
|
||||
else
|
||||
dbdel="Y"
|
||||
fi
|
||||
fi
|
||||
|
||||
[[ $dbdel == [yY] ]] && db_delete $domain
|
||||
|
|
|
@ -35,7 +35,7 @@ if [[ $domain == "-mysql="* ]]; then
|
|||
value=$(echo "${domain}" | cut -d'=' -f 2 -s)
|
||||
domain=$(echo "${domain}" | cut -d'=' -f 1 -s)
|
||||
fi
|
||||
if [[ $type == "-parked="* || $type == "-proxy="* || $type == "-wp="* || $type == "-wpsubdir="* || $type == "-wpsubdom="* || $type == "-ssl-off="* || $type == "-mysql="* ]]; then
|
||||
if [[ $type == "-parked="* || $type == "-proxy="* || $type == "-wp="* || $type == "-wpsubdir="* || $type == "-wpsubdom="* || $type == "-ssl-off="* || $type == "-mysql="* || $type == "-delete="* ]]; then
|
||||
value=$(echo "${type}" | cut -d'=' -f 2 -s)
|
||||
type=$(echo "${type}" | cut -d'=' -f 1 -s)
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue