ansible-role-motd/templates/etc/update-motd.d/80-reboot.j2

19 lines
399 B
Django/Jinja

#!/bin/bash
white="\e[39m"
green="\e[1;32m"
red="\e[1;31m"
dim="\e[2m"
undim="\e[0m"
if [ -f /var/run/reboot-required ]; then
echo
echo -e "${red}<<================= REBOOT REQUIRED =====================>"
echo
echo -e "${white}Packages causing reboot:${dim}"
cat -n /var/run/reboot-required.pkgs
echo -e "${red}<<=======================================================>${undim}"
fi