Added upgrade to latest patches before installing

This commit is contained in:
root 2023-05-26 15:40:44 +00:00
parent d72960d6ee
commit c72e728ffd

View File

@ -243,6 +243,21 @@ rm /federated/apps/mail/data/root/certs/mailfile
check_docker() {
OSRELEASE=`lsb_release -a 2>/dev/null | grep ID | awk -F: '{ print $2 }' | xargs`
echo -ne "\n* Updating OS with the latest patches.."
spin &
SPINPID=$!
# Update OS with latest patches
sudo apt-get update -y &> /dev/null
[ $? -ne 0 ] && failcheck "Couldn't run sudo apt-get update"
NEEDRESTART_MODE=a apt-get upgrade -y &> /dev/null
[ $? -ne 0 ] && failcheck "Couldn't run sudo apt-get upgrade"
kill -9 $SPINPID &> /dev/null
echo -ne "done."
# Install docker if not found
if ! command -v docker &> /dev/null; then
echo -ne "\n* Couldn't find docker, installing.."
spin &