NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
Hrungdisaster
Oct 08, 2010Aspirant
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
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
4 Replies
Replies have been turned off for this discussion
- sphardy1ApprenticeDue 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 - HrungdisasterAspirantThank 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! - ShawsonAspirantHey- 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! - koawmfotAspirantnice idea. i like the tool but couldn't you add an option for reboot?
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!