From a970d1a721f00a8610c3b6e33fa081121428955e Mon Sep 17 00:00:00 2001 From: Bram Prieshof Date: Wed, 10 Feb 2021 14:39:20 +0100 Subject: [PATCH] Added new backwards compatibility for Web-V2 --- conf.sh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/conf.sh b/conf.sh index 618a757..2e26a22 100644 --- a/conf.sh +++ b/conf.sh @@ -35,11 +35,14 @@ sed -i -e 's/PASSword/'$password'/g' -e 's/HOSTNAME/'$(hostname -s)'/g' /opt/Bac fi -############################## -# Backup-util Site Setup # -############################## +################################### +# Backup-util Site Setup # +# (For backwards compatibility) # +################################### -if [ -z ${db_suffix+x} ]; then db_suffix=`expr $(ls -l /var/www | grep -c ^d) - 1`;fi -curl --retry 7 --retry-delay 5 -s "$mrepo"/raw/branch/"$mbranch"/config/Motd/51-bckupnotice -o /etc/update-motd.d/51-bckupnotice -chmod +x /etc/update-motd.d/51-bckupnotice -source <(curl --retry 7 --retry-delay 5 -s "$mrepo"/raw/branch/"$mbranch"/CMSHook-conf.sh) +if [ -z "${itype}" ]; then + if [ -z ${db_suffix+x} ]; then db_suffix=`expr $(ls -l /var/www | grep -c ^d) - 1`;fi + curl --retry 7 --retry-delay 5 -s "$mrepo"/raw/branch/"$mbranch"/config/Motd/51-bckupnotice -o /etc/update-motd.d/51-bckupnotice + chmod +x /etc/update-motd.d/51-bckupnotice + source <(curl --retry 7 --retry-delay 5 -s "$mrepo"/raw/branch/"$mbranch"/CMSHook-conf.sh) +fi