Skip to content

Commit

Permalink
fix ssh connection
Browse files Browse the repository at this point in the history
  • Loading branch information
BassT23 authored Dec 5, 2024
1 parent 263d12a commit 0b497f7
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# shellcheck disable=SC2317
# shellcheck disable=SC2320

VERSION="4.2.1"
VERSION="4.2.2"

# Variable / Function
LOCAL_FILES="/etc/ultimate-updater"
Expand Down Expand Up @@ -699,7 +699,7 @@ UPDATE_VM () {
if [[ "$START_WAITING" == true ]]; then
echo -e "${BL}[Info]${GN} Try to connect via SSH${CL}"
echo -e "${OR}This will take some time, please wait${CL}"
echo -e "${OR}!!! During development, sleep $VM_START_DELAY secounds - could be set in config !!!${CL}"
echo -e "${OR}Sleep $VM_START_DELAY secounds - could be set in config !!!${CL}"
sleep "$VM_START_DELAY"
fi
SSH_CONNECTION=true
Expand All @@ -708,11 +708,10 @@ UPDATE_VM () {
echo -e "${OR}$VM is a template - skipping the update${CL}\n"
return
fi
KERNEL=$(qm guest cmd "$VM" get-osinfo | grep kernel-version)
if [[ "$KERNEL" =~ FreeBSD ]]; then
echo -e "${OR}FreeBSD is not supported for now${CL}\n"
return
elif [[ "$OS_BASE" =~ l2 ]]; then
if (ssh -q -p "$SSH_PORT" "$IP" "cat /etc/os-release" >/dev/null 2>&1); then
# echo -e "${OR}FreeBSD is not supported for now${CL}\n"
# return
# if [[ "$OS_BASE" =~ l2 ]]; then
OS=$(ssh -q -p "$SSH_PORT" "$IP" hostnamectl | grep System)
if [[ "$OS" =~ Ubuntu ]] || [[ "$OS" =~ Debian ]] || [[ "$OS" =~ Devuan ]]; then
# Check Internet connection
Expand Down

0 comments on commit 0b497f7

Please sign in to comment.