Perform reboot automatically when Linode kernel update is available
I am using Linode Kernel (Latest 64 bit (4.14.12-x86_64-linode92)) on Ubuntu 16.04 LTS
6 Replies
In terms of some option you can select in the Linode Manager though..no, that doesn't exist.
curl -s https://api.linode.com/v4/linode/kernels/linode/latest-64bit | grep "Latest 64 bit *$(uname -r)" > /dev/null
if [ $? -eq 1 ] ; then
systemctl reboot
fi
please help me
It is possible that an automated reboot happens at the same time as something critical, like a backup procedure or payment function. It depends heavily on what the server is doing.
@IfThenElse:
It is not a "good idea" to blindly reboot a server for a kernel update. This is why it is strongly advised to schedule a specific time and do the reboot manually.
It is possible that an automated reboot happens at the same time as something critical, like a backup procedure or payment function. It depends heavily on what the server is doing.
I am using a simple WordPress blog. Where reboot is not matter but security patches are important to me. Your advise is good for those who has high availability system and If you have advice how to implement above setting you are always welcome.
needs-restarting -r || reboot
This method is the preferred way, because it also covers important packages like the kernel, glibc and others. It can be automated in all sorts of ways.
@IfThenElse:
In CentOS, you can install the package yum-utils, which provides the command needs-restarting, then you can just execute the following (via cron, etc):
needs-restarting -r || reboot
This method is the preferred way, because it also covers important packages like the kernel, glibc and others. It can be automated in all sorts of ways.
Sorry, I don't use CentOS I use only Ubuntu please provide preferred solution related to Ubuntu 16.04 LTS