From 57fb7750d90b361211bb72f06141565de35d6859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20M=C3=B6lle?= Date: Wed, 19 Apr 2023 19:31:48 +0200 Subject: [PATCH] =?UTF-8?q?=E2=80=9Erunupdate.sh=E2=80=9C=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- runupdate.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runupdate.sh b/runupdate.sh index f8b7b07..28bda80 100644 --- a/runupdate.sh +++ b/runupdate.sh @@ -13,7 +13,7 @@ do echo "Checking for updates on server: ${SERVER}" # Establish SSH connection to remote server and run commands to check for updates - SSH_RESULT=$(ssh username@${SERVER} "sudo apt-get update > /dev/null && apt list --upgradable") + SSH_RESULT=$(ssh root@${SERVER} "sudo apt-get update > /dev/null && apt list --upgradable") # If updates are available, inform the user if [ -n "${SSH_RESULT}" ]; then @@ -37,7 +37,7 @@ if [[ $UPDATE_CONFIRMATION == "Yes" ]]; then echo "Updating server: ${SERVER}" # Establish SSH connection to remote server and run commands to update - ssh username@${SERVER} "sudo apt-get update > /dev/null && sudo apt-get upgrade -y" > /dev/null 2>&1 + ssh root@${SERVER} "sudo apt-get update > /dev/null && sudo apt-get upgrade -y" > /dev/null 2>&1 # Check the return value of ssh to determine if the update was successful if [[ $? -eq 0 ]]; then