💾 Archived View for gopher.zcrayfish.soy › 0 › irc › updatecritical captured on 2024-08-31 at 11:58:29.

View Raw

More Information

⬅️ Previous capture (2023-09-08)

-=-=-=-=-=-=-

RUNNING_KERNEL=$(uname -r)
REBOOT_KERNEL=$(file -bL /boot/vmlinuz-virt | sed 's/.*version //;s/ .*//')
COUNTDOWN=$(($(date -d 23:59:59 +%s) - $(date +%s) + 1))
if test "$RUNNING_KERNEL" = "$REBOOT_KERNEL" ; then
  :
else
  for FILE in $(find /dev/pts -perm /g+w -print); do echo -e "Broadcast message from $USER@$(hostname -s) ($(tty)) ($(date)):\n\n\\7\033[30;37;5mSystem will reboot at midnight for kernel update.\033[0m" > $FILE; done
  echo -e "*/print -current -tags notify_highlight Broadcast message from $USER@$(hostname -s) ($(tty)) ($(date)):" > /home/zachary/.weechat/weechat_fifo
  echo -e "*/print -current -tags notify_highlight     " > /home/zachary/.weechat/weechat_fifo
  echo -e "*/print -current -tags notify_highlight -escape \\7\033[30;37;5mSystem will reboot at midnight for kernel update.\033[0m" > /home/zachary/.weechat/weechat_fifo
  reboot -d $COUNTDOWN &
  rm -rf /tmp/rebootneeded
  touch /tmp/rebootneeded
fi