Browse Source

Add delete sites

master
VirtuBox 1 year ago
parent
commit
e47cb917c4
Signed by: virtubox GPG Key ID: 22EB296C97BAD476
1 changed files with 19 additions and 1 deletions
  1. +19
    -1
      mybashrc

+ 19
- 1
mybashrc View File

@ -684,6 +684,23 @@ _URBACKUP_CLIENT() {
fi
}
_DELETE_WO_SITES() {
sites=$(wo site list 2>&1)
for site in $sites; do
echo -ne " deleting $site [..]\r"
if {
wo site delete $site --force
} >>/var/log/wo/test.log; then
echo -ne " deleting $site [${CGREEN}OK${CEND}]\\r"
echo -ne '\n'
else
echo -e " deleting $site [${CRED}FAIL${CEND}]"
echo -ne '\n'
exit_script
fi
done
}
# enable color support of ls and also add handy aliases
# some more ls aliases
#alias wp='/usr/bin/wp --allow-root'
@ -764,4 +781,5 @@ alias zabbix-update=_ZABBIX_UPDATE
alias bak=_BACK_FILE
alias update-wo-fast='python3 -m pip install -I "git+git://github.com/WordOps/WordOps.git@updating-configuration#egg=wordops"'
alias clone-wordops='git clone https://github.com/WordOps/WordOps.git -b updating-configuration'
alias urbackup-client-setup=_URBACKUP_CLIENT
alias urbackup-client-setup=_URBACKUP_CLIENT
alias delete-all-site=_DELETE_WO_SITES

Loading…
Cancel
Save