Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[SOLVED] How to send remote command for Unraid to Sleep / Shutdown?

Featured Replies

Hey Folks,

 

My project to backup my important unraid data to another unraid box is going well.  I have completed the following:

 

1. Configure WOL on Backup UnRaid Box

2. Configure Rsync Protocol on Backup Unraid Box

3. Send Magic Packet from Primary Unraid Box to Wake Backup Unraid Box

4. Script to Rsync Data from Primary Unraid to Backup Unraid box

 

So I basically got data backing up successfully to my backup box.  The problem is that I have no idea how to send a command to my backup box to gracefully shut down.

 

Is there a command I can put in my script on the primary unraid to send a shut down packet to the backup box?  Can anyone point me in the right direction or provide any suggestions.

 

- Ton

 

Note:

Primary Unraid is v6 and Backup is v5.

 

GET http://<UNRAID-IP>/update.htm?shutdown=apply

get wget or curl for your machine.

 

 

While wget is simpler, curl is more powerful in the various protocols available.

 

 

unRAID 5.x includes curl and unRAID 6.x will have curl access compiled into php.

What you learn in using curl can be used in multiple places.

 

 

  • Author

Guys.. thank you so much for your quick reply.  Here are my results

 

GET http://<UNRAID-IP>/update.htm?shutdown=apply - Command Not Found

WGET http://<UNRAID-IP>/update.htm?shutdown=apply - successfully shutdown the box

CURL http://<UNRAID-IP>/update.htm?shutdown=apply - successfully shutdown the box

 

I am not expert on linux, so I am not sure what the differences are, but I do know that wget and curl in my script worked to shut down my backup box.

 

After my rsync completes, I put a sleep time enough to let my drive spin down, then i send the shutdown command.

 

Works great.

 

Thanks again guys.

 

- Ton

Or use the auto_s3_sleep script on your backup machine to power down when it is idling.

This will work even if the GUI has gone unresponsive.

 

Would you mind sharing your rsync config/setup files?

  • Author

Hey Fireball,

 

I would do S3.. but I can't get it to work properly on this motherboard.  I send the sleep command.. and it doesn't go to sleep.  Played around with the bios, and still no luck.  I took the same usb and put it on another board, and the s3 works fine.  Since this is a backup box, that will only be on during backup, the shut down was actually better for me.  I just put a sleep counter on my script to account for the time it till take the backup box to boot up vs waking up.  Other then that it all the same.

 

I can definitely share my rsync config.  I actually want to document it for my own knowledge.  I will try to get it up in the next day or so, and have it annoymized a bit too :)

 

- Ton

Well, the naming S3 is probably confusing because in that script you can select the option to shutdown instead of S3 sleep!  ;)

 

Take your time, I don't know exactly when I finish to set up my backup rig.

 

  • 9 years later...

Does CURL still work with Unraid? 

On 4/25/2024 at 5:34 PM, ChatNoir said:

This is a very old thread for Unraid versions 5 or older.

You would probably have better answers in the current general support forum :

https://forums.unraid.net/forum/55-general-support/

 

Thanks. I did work this out from reading a few posts and have it working.

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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.