× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

Newbie question: Remote Shutdown...

UberNewf
Aspirant

Newbie question: Remote Shutdown...

I run Windows OS on all my machines. I'd like to be able to dbl-click an icon to remote shutdown my ReadyNas x6, with a simple "Are you sure?" prompt. This will save me having to log into the (slow) UI on the NAS.

This post suggests to me that it's possible, but I don't have clue 1 how to get started. 🙂 Any help greatly appreciated.
Message 1 of 12
chirpa
Luminary

✓ Solution

Get curl for Windows, then make a batch/cmd file to run a curl line that will trigger a shutdown.

Curl-win32: http://curl.haxx.se/latest.cgi?curl=win32-ssl-sspi
Remote Shutdown a ReadyNAS: viewtopic.php?p=94750#p94750
Message 2 of 12
UberNewf
Aspirant

Re: Newbie question: Remote Shutdown...

That's great - thanks!

Not really a developer question as a follow-up, but along the same topic... how would one shutdown the NAS safely via the power button? Can you? I checked the user guide but the only mention of shutdown was in relation to the web UI. I'd like to not have to boot a PC just to shut down the NAS.
Message 3 of 12
chirpa
Luminary

Re: Newbie question: Remote Shutdown...

If you hold down the power button for 5 seconds it will perform a safe shutdown.
Message 4 of 12
UberNewf
Aspirant

Re: Newbie question: Remote Shutdown...

Excellent! Thanks very much... again.
Message 5 of 12
chirpa
Luminary

Re: Newbie question: Remote Shutdown...

Uber, just a tip too,

The shutdown question was in our FAQ as well, forgot about that,
faq.php#How_can_I_properly_shutdown_the_ReadyNAS%3F

It is always good to read over the FAQ contents, it is a good resource of tips and troubleshooting steps.
Message 6 of 12
freewuns
Aspirant

Re: Newbie question: Remote Shutdown...

Hi Guys,

Trying to figure this Curl out. Downloaded as per the link but trying to find the installation instructions seems elusive. I want to do an unattended shut down of an NVX by an XP machine on the network, and from what I read, Curl is what I need. The unattended shutdown will only be initiated under certain conditions by the XP machine so using the NVX power schedule is no good.

Any tips on installation etc of the linked software would be much appreciated.

Thanks 😄
Message 7 of 12
airwofl
Aspirant

Re: Newbie question: Remote Shutdown...

Not sure if this will help, but take a look at the Tamper Data add on within Firefox. This should get you what you need. I have pulled the below from Frontview within RAIDiator 4.1.6. I have NOT tested it by sending a POST back via CURL (I don't have the time) and there's no guarantee it will work in future versions of RAIDiator.

Shutdown & Reboot only:
https://<your address>/get_handler?PAGE=System&OUTER_TAB=tab_shutdown&INNER_TAB=NONE&shutdown_option2=1&command=reboot&OPERATION=set

Shutdown & Turnoff only:
https://<your address>/get_handler?PAGE=System&OUTER_TAB=tab_shutdown&INNER_TAB=NONE&shutdown_option1=1&command=poweroff&OPERATION=set

If you want a Forced filesystem check, add to the URL (don't forget a leading & as it's a new variable):
force_fsck=1

If you want a Quota check, add to the URL (don't forget a leading & as it's a new variable):
force_quotacheck=1

When using the final URL you want in CURL, make sure you POST it as get_handler probably responds differently to GETs and POSTs, as well as ensuring the user credentials are hardcoded in the command line - hope you're ok with the username and password being hardcoded / visible to people.
Message 8 of 12
freewuns
Aspirant

Re: Newbie question: Remote Shutdown...

Thanks for that......I pasted the shutdown and turnoff only command (with my IP) into address bar of Internet Explorer and it requested my username and password. When I entered UN & PW browser window returned the following and the NAS shutdown.

<?xml version="1.0" encoding="UTF-8" ?>
- <payload>
<status>success</status>
<debug />
- <log_alerts>
<message>Please close this browser session and use RAIDar to reconnect to the device after it is powered back on. System powering off... [Tue Aug 25 08:48:40 EST 2009]</message>
</log_alerts>
- <normal_alerts>
<message>NO_ALERTS</message>
</normal_alerts>
</payload>

I am a mega newb at this stuff and you pretty much lost me at "Tamper Data" lol I need to run this from a batch file on the XP machine if at all possible with no user input.

Thanks hearps for your time.
Message 9 of 12
airwofl
Aspirant

Re: Newbie question: Remote Shutdown...

Righty - so it works then! Didn't think it would via a GET but who knew....

I trust you have CURL installed for Windows and when you run it, you get:

H:\>curl
curl: try 'curl --help' or 'curl --manual' for more information

If you get a 'cannot find libeay32.dll' mesage, you need to get the compiled OpenSSL libraries installed from http://www.slproweb.com/products/Win32OpenSSL.html.

I will admit that I was tempted to write back that you need to read the --help and do a bit of Googling because it is quite easy from here but the command line that should work for a shutdown and reboot is below - to get the shutdown working or put in the filesystem / quota check, just update the content within the -d switch with & as your parameter separator - see my previous post):

curl -d "PAGE=System&OUTER_TAB=tab_shutdown&INNER_TAB=NONE&shutdown_option2=1&command=reboot&OPERATION=set" -k -u admin:<your admin password> https://<your address here>/get_handler

The -k switch is important so it doesn't try and compare the SSL certificate on the ReadyNAS to trusted lists (which you won't have).
Message 10 of 12
freewuns
Aspirant

Re: Newbie question: Remote Shutdown...

Thanks heaps.....just downloading curl and will get right into it! 😄
Message 11 of 12
jaholstein
Guide

Re: Newbie question: Remote Shutdown...

I had a similar problem with a missing libeay32.dll and CHIRPA said

Try this curl, should work without DLL issues.

http://curl.haxx.se/gknw.net/win32/curl ... in-w32.zip

and indeed ... it works great.

Jim 5/15/2012
Message 12 of 12
Top Contributors
Discussion stats
  • 11 replies
  • 8549 views
  • 0 kudos
  • 5 in conversation
Announcements