June 14, 20206 yr Hi. I'm very new to unRaid (~2 weeks setting up) and a novice in Linux. I've got everything mostly how I want it but I cannot figure out how to send a sleep command to unRaid from my Linux HTPC. I can put it to sleep from a my Windows PC using PLink -pw "<password>" <user>@<unRaidIP> "echo -n mem>/sys/power/state" (worked that out from reading forum posts here) but cannot find how to do it from Linux. I've tried ssh <user>@<unRaidIP> "echo -n mem>/sys/power/state" but that didn't do anything, it also asked for a password. I'm wanting to set up my HTPC to wake the unRaid server when it starts up and put it to sleep when it shuts down so I need a solution that can be run in a script. Can anyone help please? [Solution] Apparently the user has to have sudoers permission to shutdown the server for the above SSH command to work. As for getting around the password prompt you can use SSHPASS command (sudo apt-get install sshpass) to feed the password as text or from a file. sshpass -p "<Password>" ssh <user>@<unRaidIP> "echo -n mem>/sys/power/state" or sshpass -f <path/filename> ssh <user>@<unRaidIP> "echo -n mem>/sys/power/state" I hope this info helps others here. Edited June 15, 20206 yr by Spanners44
Archived
This topic is now archived and is closed to further replies.