0

I got a Dell Server (PowerEdge R420) and a QNAP NAS (TS-412-U) connected to the UPS (Dell 1000W Rack), the ULNM Software is installed at the Server, the UPS is hooked up to the Server via USB.

In the case of a shutdown event, i want to run a .bat File that is shutting down the NAS via plink prior to the Server shutdown, the .bat File looks like this:

C:\shutdown\plink.exe admin@192.168.1.10 -batch -pw xxxxx -m C:\shutdown\nas.shutdown
shutdown.exe -s -t 30

nas.shutdown contains this:

halt

If I run the .bat File directly on the Server via Remote Desktop the Script shuts down the NAS, then shuts down the server, everything alright.

If I execute the Script via ULNM Shutdown Event, a server shutdown in 1 Minute will be initiated and executed but the NAS shut down wont, the plink part seems not to be executed.

ULNM Shutdown Event Assistant

If I send the Scripts Output to a log file, it stays empty, no error messages or any kind of output.

C:\shutdown\plink.exe admin@192.168.1.10 -batch -pw xxxxx -m C:\shutdown\nas.shutdown > C:\shutdown\test.log
shutdown.exe -s -t 30

Anybody got a simmilar problem or a solution to my problem?

Thank you very much.

hub
  • 342
  • 1
  • 4
  • 15

1 Answers1

1

The Problem was accepting the fingerprint, I did this with my user account but not with the account that executed the shutdown command initiated over the web-interface.

(-batch just surpresses the prompt, not answears it neither negative or positiv...)

To resolve the Problem, its possible to pipe in a y like this:

y | C:\shutdown\plink.exe admin@192.168.1.10 -pw xxxxx -v halt

Or use a privat key with the matching public key entered into the authorized_keys file on the NAS.

hub
  • 342
  • 1
  • 4
  • 15