Skip to content

Commit aab2ea0

Browse files
authored
Merge pull request #166 from BassT23/beta
fix ssh connection
2 parents 263d12a + 0b497f7 commit aab2ea0

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

update.sh

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# shellcheck disable=SC2317
1010
# shellcheck disable=SC2320
1111

12-
VERSION="4.2.1"
12+
VERSION="4.2.2"
1313

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

0 commit comments

Comments
 (0)