From 68c02f4f1af0e4d3c6097e0498086e65c34e7ff0 Mon Sep 17 00:00:00 2001 From: James Antill Date: Tue, 24 Mar 2026 17:25:19 -0400 Subject: [PATCH] maint-update-reboot: Add script to update, maybe reboot maintainer_test hosts. Signed-off-by: James Antill --- scripts/maint-update-reboot.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 scripts/maint-update-reboot.sh diff --git a/scripts/maint-update-reboot.sh b/scripts/maint-update-reboot.sh new file mode 100755 index 0000000000..1fc34fbbd5 --- /dev/null +++ b/scripts/maint-update-reboot.sh @@ -0,0 +1,16 @@ +#! /bin/sh -e + +for host in $(ansible maintainer_test --list-host | tail -n +2); do + +echo " ======== Host: $host ========" + +ssh "$host" dnf --refresh -y up + +if [ "$(ssh $host who | wc -l)" = "1" ]; then + ansible -m reboot "$host" + ssh "$host" rkhunter --propupd +else + echo " ** Skipping reboot as Users on: $host" +fi + +done