Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

issue sleep (S3) command from remote Linux pc [SOLVED]

Featured Replies

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 by Spanners44

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.