fix: simplify reboot to direct SSH invocation
This commit is contained in:
+2
-4
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user