1
0

fix: simplify reboot to direct SSH invocation

This commit is contained in:
2026-05-01 22:00:32 +02:00
parent 0360323c10
commit 5728e8769a
2 changed files with 4 additions and 6 deletions
+2 -4
View File
@@ -201,11 +201,9 @@ runCmd() { # $1=host $2=name $3=cmd
case ${CMD} in
reboot)
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
echo "reboot" | tee -a "${LOGFILENAME}"
if ! runSSH "${HOST}" reboot | tee -a "${LOGFILENAME}"; then
ERROR=1
else
sleep 1
fi
;;
apt)