Redirect stderr when calling shutdown, too
[trigger-rcmd.git] / scripts / trigger-rcmd
index 5d96d7fae9aab9bb9585bc7ac576dcd6adfbd76a..55df7388492355dbcd38e194194298281d2de408 100755 (executable)
@@ -102,7 +102,7 @@ do_rcmd() {
                if [ "$rsys_users" = "0" ]; then
                        echo "$NAME: Power off \"$SYSTEM\" again ..."
                        # shellcheck disable=2029
-                       ssh -o PreferredAuthentications=publickey -q "$SYSTEM" "sync; shutdown -hP $SHUTDOWN_TIME" >/dev/null
+                       ssh -o PreferredAuthentications=publickey -q "$SYSTEM" "sync; shutdown -hP $SHUTDOWN_TIME" 2>&1 >/dev/null
                        if [ $? -ne 0 ]; then
                                echo "$NAME: Failed to power off \"$SYSTEM\"!" >&2
                                return 5