From 4b1729a795a551177ef903fd42d6f869011242cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20M=C3=B6lle?= Date: Wed, 19 Apr 2023 19:45:19 +0200 Subject: [PATCH] =?UTF-8?q?=E2=80=9Erunupdate=E2=80=9C=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- runupdate | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runupdate b/runupdate index f8b7b07..28bda80 100644 --- a/runupdate +++ b/runupdate @@ -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