Add delete sites
This commit is contained in:
parent
7f4d04c266
commit
e47cb917c4
20
mybashrc
20
mybashrc
|
@ -684,6 +684,23 @@ _URBACKUP_CLIENT() {
|
||||||
fi
|
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
|
# enable color support of ls and also add handy aliases
|
||||||
# some more ls aliases
|
# some more ls aliases
|
||||||
#alias wp='/usr/bin/wp --allow-root'
|
#alias wp='/usr/bin/wp --allow-root'
|
||||||
|
@ -764,4 +781,5 @@ alias zabbix-update=_ZABBIX_UPDATE
|
||||||
alias bak=_BACK_FILE
|
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 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 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…
Reference in New Issue