How to put Unraid to sleep with a remote command from Windows?


nid

Recommended Posts

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

Link to comment

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 by Fireball3
Link to comment
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 by nid
Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.