diff --git a/runupdate.sh b/runupdate.sh index 28bda80..f8b7b07 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 root@${SERVER} "sudo apt-get update > /dev/null && apt list --upgradable") + SSH_RESULT=$(ssh username@${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 root@${SERVER} "sudo apt-get update > /dev/null && sudo apt-get upgrade -y" > /dev/null 2>&1 + ssh username@${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