Skip to content
Snippets Groups Projects
Commit 844798c6 authored by Bob Mottram's avatar Bob Mottram
Browse files

Don't show please wait in simple backup mode

parent 52fab3df
No related branches found
No related tags found
No related merge requests found
......@@ -55,17 +55,21 @@ DATABASE_PASSWORD=$(${PROJECT_NAME}-pass -u root -a mariadb)
restore_counter=0
function please_wait {
local str width height length
width=$(tput cols)
height=$(tput lines)
str="Standby to restore from USB"
length=${#str}
clear
tput cup $((height / 2)) $(((width / 2) - (length / 2)))
echo "$str"
tput cup $((height * 3 / 5)) $(((width / 2)))
echo -n ''
local str width height length
if [ $simple_backup ]; then
return
fi
width=$(tput cols)
height=$(tput lines)
str="Standby to restore from USB"
length=${#str}
clear
tput cup $((height / 2)) $(((width / 2) - (length / 2)))
echo "$str"
tput cup $((height * 3 / 5)) $(((width / 2)))
echo -n ''
}
please_wait
......@@ -568,9 +572,9 @@ function restore_spamassassin {
if [ -d "$temp_restore_dir/home/$USERNAME" ]; then
cp -rf "$temp_restore_dir/home/$USERNAME/.spamassassin" "/home/$USERNAME/"
else
if [ ! -d "/home/$USERNAME/.spamassassin" ]; then
mkdir "/home/$USERNAME/.spamassassin"
fi
if [ ! -d "/home/$USERNAME/.spamassassin" ]; then
mkdir "/home/$USERNAME/.spamassassin"
fi
cp -rf "$temp_restore_dir/"* "/home/$USERNAME/.spamassassin/"
fi
# shellcheck disable=SC2181
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment