[Errno 2] No such file or directory
Closed this issue · 2 comments
Hi guys
First of all, this is an awesome piece of script - Thank you!!
I am trying to use it to shutdown or wol my servers, but without success.
I think I have defined the parameters well, but the script is raising a "[Errno 2] No such file or directory"
Could you help?
From my .conf:
topiclist = {
# topic payload value program & arguments
"smartthings/Computer openmediavault/switch" :
'wake openmediavault' : [ '/usr/bin/wakeonlan', '-p', '7', 'XX:XX:XX:XX:XX:XX' ],
'shutdown openmediavault' : [ '/usr/bin/ssh', 'root@openmediavault', 'shutdown', 'now' ],
},
}
From the log:
Running t=smartthings/Computer openmediavault/switch: ['/usr/bin/ssh', 'root@openmediavault', 'shutdown', 'now']
2016-08-08 13:01:15,346 Running command: ['/usr/bin/ssh', 'root@openmediavault', 'shutdown', 'now']
2016-08-08 13:01:15,447 Result: *****> Command '['/usr/bin/ssh', 'root@openmediavault', 'shutdown', 'now']' returned non-zero exit status 255
I do not see [Errno 2] No such file or directory
in anything you've logged above. Please clarify.
Problem might be you don't have a shell, thus the ssh key can't be found? Try passing the key as a parameter.