March 25, 201115 yr Hi All I back the critical data I have on my unRAID unit to a USB drive using Areca Backup running on a Windows 7 PC... The process runs like this; 1.55am Windows 7 PC turns on (using wake on ring in BIOS) 1.55am unRAID unit turns on (using wake on ring in BIOS) 2.05am Windows 7 PC runs Areca Backup using Windows Task Manager in "no user logged in" mode --?--am Windows 7 PC shuts down when backup is complete using "shutdown" command in batch file 6.30am unRAID unit switches off using "echo "powerdown" | at 06:30" in go file This all works brilliantly... except; The backup runs for as long as it runs - sometimes it runs for only a few minutes, other times it runs for hours - depending on what it has to do. To minimise the risk of it shutting down mid-backup I have given it a 4.5hr window by shutting unRAID down at 6.30am - but I was wondering if anyone knows a script which can be used in Windows to initiate a clean powerdown over the network? I do have unMenu installed and with that the APC UPS module and also the Powerdown module. Any help will be greatfully appreciated.
March 25, 201115 yr You could run a script with this line: curl http://192.168.0.193:8080/user_scripts?command=Power+Down or wget http://192.168.0.193:8080/user_scripts?command=Power+Down I don't know if windows has curl or wget. If not there must be an equivalent.
March 25, 201115 yr Author I found this very old post which works great; http://lime-technology.com/forum/index.php?topic=493.0 ...except it brings up a prompt box asking for a username and password!! As long as I am there to input it, it works great. The problem is that I am not there at 2am or later, to log in. The script I am using in my batch file is; @echo off start iexplore.exe "http://unraid-1/update.htm?startState=STARTED&cmdStop=Stop" ping -n 3 127.0.0.1 > NUL rem start iexplore.exe "http://unraid-1/update.htm?startState=STOPPED&shutdown=Power+down" Does anyone know how to get round the username/password stumbling block?? Thanks in advance
March 25, 201115 yr don't set a root username and password for the box. If this was on a Mac you could use something like AppleScript to fill in the box. AutoIt or something similar might work on a Windows machine.
March 25, 201115 yr I have a root password set and the curl command I gave doesn't ask for a password. If you use the user script powerdown it will stop the array and cleanly shutdown with one line.
March 28, 201115 yr Author Thanks everyone for your help... unfortunately clearing the password is not an option! But thanbks to dgaschk for your advice. I am not very familiar with Linux and wasnt sure what CURL is - but with the help of google and your comments, I founf that this line does exactly what I want; start iexplore.exe "http://server_ip_adress:8080/user_scripts?command=Power+Down" Thanks for your prompt help Edit by Joe L: I changed the specific IP address to make the link above not be a valid URL... otherwise if clicked by you, it would shut down your server.
Archived
This topic is now archived and is closed to further replies.