Jump to content

Successful "PowerDown" Batch File W/O Logon - Is it OK?


Info

Recommended Posts

Hi,

 

I have configured the Asus P5LD2-VM 2.0 to successfully automatically WOL the unRaid, through a .bat file, when I power up the media client. I have also discovered a way to "Powerdown" the unRaid without logon by a .bat file via the "Powerdown" .Html button command. This allows many custom options for on/off unRaid.

 

I would like to know if initiating the "Powerdown" Command by this batch file ( @echo off

start iexplore.exe "http://tower/update.htm?startState=STOPPED&shutdown=Power+down") is detrimental to the system?

 

It appears and should be identical to the "Powerdown" through telnet logon or the html "Powerdown" button, which it is barrowed from. I found in a post, by Tom, that the "Powerdown" is a clean safe way to shut down, but is it necessary to "Stop" .Html button first? I have a way to add this, but it is not as clean.

 

"Powerdown" works every time and eliminates all need for a compatible MB, difficult script, or logon. For instance Girder could watch any software like DVDlobby for termination to execute the above .bat. The possibilities are quite immense.

 

As soon as I get a chance I will lay out my configurations for WOL and Powerdown. The WOL is dependant on MB and works great, although it did take odd bios settings to get it to work.

 

Link to comment

Hi,

 

I guess, I’m answering some of my own questions. After testing a few times I did discover that this .bat ( @echo off start iexplore.exe "http://tower/update.htm?startState=STOPPED&shutdown=Power+down") does not shutdown properly and causes a parity check on the ensuing reboot.

 

I tried the HTML "Stop" in a batch and it caused refreshing every couple of seconds, which caused the parity restart each time. So I created this combination( Below) "Stop" and "Powerdown" with a 3 second time delay to allow the array to process the stop command and then" Powerdown". On reboot, everything is as it should be.

 

I would like some feedback whether there is something wrong in this approach.

 

Thanks,

 

 

Batch file

@echo off

start iexplore.exe "http://tower/update.htm?startState=STARTED&cmdStop=Stop"

ping -n 3 127.0.0.1 > NUL

start iexplore.exe "http://tower/update.htm?startState=STOPPED&shutdown=Power+down"

Link to comment
  • 2 weeks later...

Yes that appears ok.  The 'Stop' command will first un-mount all the data drives, then write the super.dat file indicating a "clean shutdown".  The 'Powerdown' command initiates a linux power-down.  What happens if you don't use 'Stop' first is there's a race condition between the unraid driver being unloaded and the file systems being unmounted.  If the file system unmount wins, then the super.dat file won't get written & thus next powerup system thinks an "unclean" shutdown occurred and will commence with parity check.

Link to comment

When using the batch file stop command, either by itself or in combinations, poses the largest hurdle. It appears to stop and attempts to refresh, but never loads the subsequent page with Power

Off. It just appears to start and stop the discs repeatedly until IE is stopped. On startup, it would intermittently start in parity check. It seems like there is something missing in the command line?

 

For the sake of automation, I resorted to using Girder to apply actual timed left clicks to the web pages. It works flawlessly, as if you were manually shutting down through the web page.

 

So with the combination of the MB's perfect WOL signaled through a batch file from the media center to start the unRaid (I use the opening of Cinemar Main Lobby to trigger the batch) and Girder to shutdown on Cinemar app closing, it is truly automated.

 

Of course with this, you could have unRaid start just before you get home, a push of remote button or startup of any other PC....... and have it shutdown with the same sorts of triggers. It works great!!

 

 

This post did not seem to generate a great deal of interest, so it appears most users of unRaid perfer to push a button and log on for startup and shutdown. However if anyone would like my configurations let me know I will post.

 

Thanks for the reply.

 

 

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...