From 7f4d04c2662652a89c463c7ba2c8ccfe6201c62e Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 26 Nov 2019 12:50:03 +0100 Subject: [PATCH] add urbackup and clone wordops --- mybashrc | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/mybashrc b/mybashrc index 1154227..f031d86 100644 --- a/mybashrc +++ b/mybashrc @@ -7,7 +7,6 @@ else PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u\[\033[01;33m\]@\[\033[01;36m\]\h \[\033[01;33m\]\w \[\033[01;35m\]\$ \[\033[00m\]' fi - if [ "$(id -u)" != "0" ]; then IS_SUDOERS=$(groups | grep sudo) if [ -n "$(command -v sudo)" ] && [ -n "$IS_SUDOERS" ]; then @@ -672,6 +671,19 @@ _BACK_FILE() { fi } +_URBACKUP_CLIENT() { + TF=$(mktemp) && wget "https://hndl.urbackup.org/Client/2.4.9/UrBackup%20Client%20Linux%202.4.9.sh" -O "$TF" && sudo sh "$TF" + rm -f "$TF" + sed -i 's/RESTORE=disabled/RESTORE="server-confirms"/' /etc/default/urbackupclient + wget -O "$HOME/mysqldump.sh" vtb.cx/mysqldump + chmod +x "$HOME/mysqldump.sh" + if command_exists ufw; then + ufw allow from 144.76.159.118 to any port 35621 + ufw allow from 144.76.159.118 to any port 35622 + ufw allow from 144.76.159.118 to any port 35623 + fi +} + # enable color support of ls and also add handy aliases # some more ls aliases #alias wp='/usr/bin/wp --allow-root' @@ -750,4 +762,6 @@ alias SSETUP=_SETUP_CONTROLLER alias journalctfail='journalctl -b -p err -S "yesterday"' 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"' \ No newline at end of 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 \ No newline at end of file