Jump to content

How to: Schedule reboot if UnRAID update is pending

Recommended Posts

It's never a convenient time for me to reboot my server after I update UnRAID. Sometimes it take me days and sometimes there is a another update before I get around to rebooting. So I reverse-engineered the part of the webUI that displays the the "reboot required" message to determine if an upgrade is awaiting a reboot and wrote this small script:

content=$(head -c 20 "/usr/local/emhttp/plugins/unRAIDServer/README.md")
if [[ $content =~ ^\*\*(REBOOT REQUIRED|DOWNGRADE) ]]; then
    powerdown -r

You can place it in User Scripts or use the latest "Backup/Restore Appdata" plugin and run it before or after a scheduled backup. Remember to make it executable (chmod +x).

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...