fix: detach reboot command to avoid false SSH failures
This commit is contained in:
+4
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user