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