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


Recommended Posts

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.

 

Link to comment

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

Link to comment

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

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.

Guest
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.