nid Posted October 21, 2018 Share Posted October 21, 2018 I'm already using a bat file for powering down and it works fine. It has the following code: plink.exe -ssh -pw yourpassword root@yourIP powerdown How to do the same to send a suspend/sleep command? Windows 10 and Unraid 6.6.2 Quote Link to comment
nid Posted October 24, 2018 Author Share Posted October 24, 2018 Surprised by the silence in this forum with so knowledgeable people. Although I've already searched about this around the internet and couldn't find any clear info. Perhaps it is just not possible (yet)? Quote Link to comment
Fireball3 Posted October 24, 2018 Share Posted October 24, 2018 Try this one instead of the "powerdown" echo -n mem > /sys/power/state If it's not working, use it to search this forum and you'll find a couple of answers. Quote Link to comment
nid Posted October 24, 2018 Author Share Posted October 24, 2018 2 hours ago, Fireball3 said: Try this one instead of the "powerdown" echo -n mem > /sys/power/state If it's not working, use it to search this forum and you'll find a couple of answers. Yes it's working when I type in a local terminal but how to send it through a batch file from Windows? I tried with plink and it doesn't work, but maybe the syntax is incorrect: plink.exe -ssh -pw yourpassword root@yourIP echo -n mem > /sys/power/state Quote Link to comment
Fireball3 Posted October 24, 2018 Share Posted October 24, 2018 (edited) Maybe something like plink.exe -ssh -pw yourpassword root@yourIP "echo -n mem > /sys/power/state" You have to ensure that the whole expression is parsed. Edit: Another possibility is pasting the expression into a file, making it +x and calling the file with plink. Edited October 24, 2018 by Fireball3 Quote Link to comment
nid Posted October 24, 2018 Author Share Posted October 24, 2018 Thanks it works, both ways. Quote Link to comment
Fireball3 Posted October 24, 2018 Share Posted October 24, 2018 Nice!By the way, do you know the s3sleep plugin? Quote Link to comment
nid Posted October 24, 2018 Author Share Posted October 24, 2018 (edited) 11 hours ago, Fireball3 said: Nice! By the way, do you know the s3sleep plugin? Yes I'm using it for automatic suspension after a specific amount of array inactivity. But I also like to be able to do it manually with a single double click. I don't like the fact that the root password is exposed like that in the Bat file (of course it's just in a home environment). Edited October 25, 2018 by nid Quote Link to comment
Fireball3 Posted October 26, 2018 Share Posted October 26, 2018 On 10/24/2018 at 10:40 PM, nid said: I don't like the fact that the root password is exposed like that in the Bat file (of course it's just in a home environment). It is possible to work with public/private keys. Of course, setting up is a bit of work. I'm sure there are also some how-to's in this forum. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.