MHFraser

Member
Feb 28, 2019
20
2
3
Australia
cPanel Access Level
Root Administrator
Hi Everyone,
I have a DNS cluster with 6 members. (geographically diverse)
They update automatically (good) but then sit there waiting patiently for me to log in to see if they need to reboot.

  1. At the very least, couldn't they send an email when the need to restart? Email works from the boxes, they email me about other stuff.
  2. Better still why not just let them auto-reboot? DNS is the way it is for a reason. A single box being unavailable for a few minutes will barely be noticeable.
I know I could build something around
Code:
whmapi1 system_needs_reboot
but is there a better option. eg post update hooks?
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
Auto rebooting won't ever be something that is implemented by cPanel - you'd need to set something custom up for this if that's what you wanted to do but this could cause serious issues in the event that the server for some reason didn't come back up or there was some sort of catastrophic failure.


As far as notices for updates that require reboots. cPanel & WHM including DNSOnly sends notices in relation to this. The notification settings can be found at WHM>>Server Contacts>>Contact Manager (from DNSOnly) -> Notifications of Outdated Software, which includes kernel updates - which unless you have kernelcare the update won't be applied.


If you really wanted a script that would explicitly tell you the system needs to be rebooted - for
Code:
whmapi1 system_needs_reboot
It could relatively simply be added to a script or hook to run after nightly maintenance and send a notification if the needs_reboot value is 1

The guide to WHMAPI1 can be found here: https://documentation.cpanel.net/display/DD/Guide+to+WHM+API+1