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

Command Line Shutdown for ReadyNAS PRO PIONEER Edition

Hrungdisaster
Aspirant

Command Line Shutdown for ReadyNAS PRO PIONEER Edition

Hi there!

I have part of my home network (PCs/Switch/ReadyNAS) powered by an UPS and I would like to shutdown my ReadyNAS PRO PIONEER Edition RNDP600E via the Windows 7 commandline. (Since I wood like to triggger several commands from the main server and thereafter shut it down I can not connect the UPS directly to the NAS).

I found a thread discussing almost the same issue under

http://www.readynas.com/forum/viewtopic.php?t=2996&highlight=currentpage

Question 1: Is there a small tool/exe/batch, that will shutdown the NAS via commandline?

Question 2: If not, is the curl command mentioned in the above thread the right approach for the problem? Using curl for Windows, what will be the right curl command for the RNDP600E?

curl -u admin:infrant1 -k "https://10.0.0.3/admin/index.cgi?CURRENTTAB=Shutdown&CURRENTPAGE=System&MODE=Advanced&button=Current&command=poweroff&MODIFIED=1"

Best regards and thanks in advance!

Edit: Since my UPS has just one USB and I wood like to triggger several commands from the main server I can not connect the UPS directly to the NAS.

Matthias
Message 1 of 5
sphardy1
Apprentice

Re: Command Line Shutdown for ReadyNAS PRO PIONEER Edition

Due to updates to the NAS firmware, the command needed has changed since that post. Try:

curl -u admin:password -k "https://nas_ip_address_or_name/get_handler?PAGE=System&OUTER_TAB=tab_shutdown&INNER_TAB=NONE&shutdown_option1=1&command=poweroff&OPERATION=set"

The command effectively simulates you going into frontview and selecting shutdown from the appropriate page
Message 2 of 5
Hrungdisaster
Aspirant

Re: Command Line Shutdown for ReadyNAS PRO PIONEER Edition

Thank you VERY much for the quick reply, it works perfect!

For those who are not familiar with curl (like me a half an hour ago):
1. Copy curl for Windows WITH SSL support into a directory of your choice.
2. Copy the .dll files for OPenSSL (libeay32.dll and ssleay32.dll) into the same directory. (Not shure, there might be a more elegant way, the proper windows directory for example, but this way works just fine).
3. With a texteditor create a .bat file, e.g. "shutdown.bat"., with the following content:

curl -u admin:password -k "https://nas_ip_address_or_name/get_handler?PAGE=System&OUTER_TAB=tab_shutdown&INNER_TAB=NONE&shutdown_option1=1&command=poweroff&OPERATION=set"

Thanks again, sphardy!
Message 3 of 5
Shawson
Aspirant

Re: Command Line Shutdown for ReadyNAS PRO PIONEER Edition

Hey- I've just written a tiny command line tool (ShutdownNASBox.exe 9kb) which does just this (for Windows users and for the ReadyNAS Duo)- and a couple of tutorials showing how to make your own. I figure it might work with the pro- not sure how different the web ui is? I guess very similar. Any way- it works well with the ReadyNAS Duo.

The app;
http://codeblog.shawson.co.uk/netgear-readynas-duo-command-line-shut-down-utility/

How it's made (very simple);
http://codeblog.shawson.co.uk/automatic-shutdown-of-my-netgear-readynas-duo-network-storage-server/

This is a quick tutorial I wrote showing how to make Windows 7 run this tool automatically on shut down;
http://codeblog.shawson.co.uk/automatic-nas-box-shutdown-how-to-execute-applications-on-windows-shutdown-part-22/

Let me know if you've any problems!
Message 4 of 5
koawmfot
Aspirant

Re: Command Line Shutdown for ReadyNAS PRO PIONEER Edition

nice idea. i like the tool but couldn't you add an option for reboot?
Message 5 of 5
Top Contributors
Discussion stats
  • 4 replies
  • 3062 views
  • 0 kudos
  • 4 in conversation
Announcements