1
0

fix: detach reboot command to avoid false SSH failures

This commit is contained in:
2026-04-26 02:08:34 +02:00
parent ba5a8c9397
commit c138d9201e
2 changed files with 5 additions and 1 deletions
+4 -1
View File
@@ -201,8 +201,11 @@ runCmd() { # $1=host $2=name $3=cmd
case ${CMD} in
reboot)
if ! runSSH "${HOST}" reboot | tee -a "${LOGFILENAME}"; then
echo "reboot (detached)" | tee -a "${LOGFILENAME}"
if ! runSSH "${HOST}" sh -c 'nohup sh -c "reboot || /sbin/reboot || shutdown -r now" >/dev/null 2>&1 </dev/null &' | tee -a "${LOGFILENAME}"; then
ERROR=1
else
sleep 1
fi
;;
apt)