|
Post by nicomaniaque on Jul 4, 2008 23:59:21 GMT 7
Hi, i don't know if something alredy exist for this:
N2100 Connected to a router, PC connected to the same router, APC UPS connected via USB on PC1
It'S possible to send a "command" or something to shutdown the NAS When the pc detect a lost of power from the ups?
a module? or a ssh commande in a file (executed when the bat of the ups get to low)
Thanks!!
|
|
wengi
Full Member
Posts: 102
|
Post by wengi on Jul 6, 2008 17:13:41 GMT 7
Hi,
Depending on the OS of your PC you could write a batch/script ehich logs in via ssh and shuts down the NAS.
wengi
|
|
|
Post by nicomaniaque on Jul 6, 2008 20:49:30 GMT 7
Hum, This Pc run Windows 2K (smal pc for DL) Pentium2 300MHZ 256 M ram lol... If you have an idea for the batch file i take it Thanks
|
|
wengi
Full Member
Posts: 102
|
Post by wengi on Jul 7, 2008 13:21:22 GMT 7
Hi, download putty and puttygen Generate private/public key so you can login to the NAS without password (google: "ssh login key") Create a batch (eg. nas_off.bat): putty root@NAS "halt now" This is not tested! Just to give you an idea. wengi have a look at the.earth.li/~sgtatham/putty/0.60/puttydoc.txt chapter 3.8
|
|
|
Post by nicomaniaque on Jul 7, 2008 20:00:23 GMT 7
Thanks for all! i will do some test and post all result EDIT: Im able via a batch file to login the nas (reseted the ssh key for testing purpose) putty N2100 -l root -pw irresistible If i add "halt now" or halt now or anything i got an pop up : Invalid Port Number
|
|
|
Post by nicomaniaque on Jul 8, 2008 13:54:37 GMT 7
I Got IT!!!
Really easy!
first: The BAT file:
putty N2100:22 -l root -pw irresistible -m cmd
and in a file called cmd:
halt now
its work, after ~12 second the n2100 was off!
Thanks wengi!
|
|
wengi
Full Member
Posts: 102
|
Post by wengi on Jul 8, 2008 14:33:26 GMT 7
Good work wengi
|
|
|
Post by getmythe on Jul 8, 2008 16:57:38 GMT 7
If you prefer not to lose any data, better use Thecus' own shutdown script/img/bin/sys_halt
|
|
|
Post by nicomaniaque on Jul 8, 2008 23:23:56 GMT 7
Oh! i try this now result: PERFECT they shutdown Thanks for this!
|
|