PDA

View Full Version : NAS Remote Shutdown


mikjoel
02-06-11, 10:19
Hi,

I'm using a Base 3.0 togehter with a QNAP TS410. From my Windows 7 PC I can shut down the NAS by sending this command in a DOS command window
( plink 192.168.*.* -P 22 -ssh -l admin -pw ****** -v poweroff ).
Is there a way to send this command from the Dune to the NAS with the remote control ?

j5races
04-06-11, 04:27
Pretty sure you can't.

ScottJ97
07-06-11, 09:02
Hi,

I'm using a Base 3.0 togehter with a QNAP TS410. From my Windows 7 PC I can shut down the NAS by sending this command in a DOS command window
( plink 192.168.*.* -P 22 -ssh -l admin -pw ****** -v poweroff ).
Is there a way to send this command from the Dune to the NAS with the remote control ?

The only reliable way to get the Dune to run an arbitrary command through the GUI is with a dune_service_*.dsf file. Then you select that file with the remote control.

Is that acceptable? You would have to navigate to this file and click on it any time you wanted to shut down your NAS.

(Minor problem: there is no SSH client on the Dune, so the dsf would have to include that too.)

mikjoel
07-06-11, 11:59
a .dsf file would be ok for me, but how is the format of such a dsf file ? Is there any documentation of the file format ?

ScottJ97
07-06-11, 20:47
a .dsf file would be ok for me, but how is the format of such a dsf file ? Is there any documentation of the file format ?

Here is some discussion of the dsf format (http://www.mpcclub.com/forum/showthread.php?t=26187).

If you're not comfortable with hacking around in Linux, I could make a dsf for you. I enjoy this sort of thing.

ScottJ97
09-06-11, 21:18
I compiled DropBear (http://matt.ucc.asn.au/dropbear/dropbear.html) SSH client for the Dune, wrote a one-line shell script to run it with your user/password and poweroff command, and used makeself (http://megastep.org/makeself/) to make this pair into a self-extracting shell script. Then dsf_pack (http://pastebin.com/raw.php?i=bG8ZARUR) turns that into a dsf file.

You reported that it works for you.

I have some more Dune Hacking (http://scottjohnson.org/wiki/Dune/Hacking) information on my wiki. Work in progress.

mikjoel
09-06-11, 21:52
I can confirm - it works perfect for me Thanks again !

a5ian300zx
10-06-11, 00:02
I compiled DropBear (http://matt.ucc.asn.au/dropbear/dropbear.html) SSH client for the Dune, wrote a one-line shell script to run it with your user/password and poweroff command, and used makeself (http://megastep.org/makeself/) to make this pair into a self-extracting shell script. Then dsf_pack (http://pastebin.com/raw.php?i=bG8ZARUR) turns that into a dsf file.

You reported that it works for you.

I have some more Dune Hacking (http://scottjohnson.org/wiki/Dune/Hacking) information on my wiki. Work in progress.

Hi,

could you make me one too please, I always have to get up to switch it off and this would be perfect, I did not know you can do this. I'll pm you my details if you are happy to do this please.

a5ian300zx

ScottJ97
10-06-11, 00:17
could you make me one too please, I always have to get up to switch it off and this would be perfect, I did not know you can do this. I'll pm you my details if you are happy to do this please.

Sure, PM sent.

One question for both of you: how do you turn ON the NAS? Don't you have the same kind of issue?

a5ian300zx
10-06-11, 00:30
Hi,

I use the phone to switch it on but if you can have one for the Dune that would be great too.

I have a Android phone Samsung Galaxy 2 - not sure if there is a way i can switch it off using the phone?

Thanks once again

a5ian300zx

ScottJ97
10-06-11, 02:34
Hi,

I use the phone to switch it on but if you can have one for the Dune that would be great too.

I have a Android phone Samsung Galaxy 2 - not sure if there is a way i can switch it off using the phone?


How does the phone turn it on? Is it wake-on-LAN? That is easy to do via dsf.

I don't know anything about Android but I'm sure it's possible to switch it off from there. You will need to find someone who enjoys hacking on Android the same way I enjoy hacking on the Dune. :)

skank
10-06-11, 10:04
mmm
Can you make a file to turn on my unraid server?
and one to turn off my unraid server?

a5ian300zx
10-06-11, 14:54
How does the phone turn it on? Is it wake-on-LAN? That is easy to do via dsf.

I don't know anything about Android but I'm sure it's possible to switch it off from there. You will need to find someone who enjoys hacking on Android the same way I enjoy hacking on the Dune. :)

Hi,

yes a simple WOL app that does the trick, I will ask on a android form it someone can help with remote shutdown of command from the android too :)

but a WOL from the Dune would be great too if you can please.

Thanks once again for all your help/advice.

a5ian300zx

mikjoel
10-06-11, 16:56
Sure, PM sent.

One question for both of you: how do you turn ON the NAS? Don't you have the same kind of issue?

Hi - I have to turn it on with an Switch - I don't think Qnap TS410 supports any kind of remote turn on ( I'm sure there's no Wake on LAN on this device )

a5ian300zx
10-06-11, 18:22
Hi - I have to turn it on with an Switch - I don't think Qnap TS410 supports any kind of remote turn on ( I'm sure there's no Wake on LAN on this device )

Hi,

it does support Wake on Lan it will be located under power management in the admin page, you need to switch it on.

you can wake it from within your wireless network or over the internet.

a5ian300zx

a5ian300zx
10-06-11, 18:46
hi,

im going to try see if i can get the nas to switch off using my android phone with some ssh apps like.

ConnectBot
Telnet
Lazier Geek (this seems like it has all the options)
Server assistant

all free from android market.

a5ian300zx

ScottJ97
10-06-11, 19:48
mmm
Can you make a file to turn on my unraid server?
and one to turn off my unraid server?

You will have to give me more details. If it's wake-on-LAN I will need the MAC address. How do you shutdown? For the Qnap NAS of the OP, it is ssh in, then run `poweroff`. Same thing for Unraid?

PM me the details and I can make the dsf files when I get some time (in a few days).

mikjoel
14-06-11, 16:23
Hi,

it does support Wake on Lan it will be located under power management in the admin page, you need to switch it on.

you can wake it from within your wireless network or over the internet.

a5ian300zx

Hi - I'm still sure my qnap TS410 does not support WOL - there's no option under power management - where did you find it ?

a5ian300zx
14-06-11, 19:04
Hi - I'm still sure my qnap TS410 does not support WOL - there's no option under power management - where did you find it ?


Hi,

sorry you are right it does not support this feature.

http://forum.qnap.com/viewtopic.php?p=91511

a5ian300zx