AlexGustafsson / homebridge-wol

A Wake on Lan plugin for Homebridge
MIT License
296 stars 30 forks source link

More than one shutdownCommand #166

Closed tanmaster closed 3 years ago

tanmaster commented 3 years ago

I have a very edgy case in which I run dual boot windows and linux, both needing seperate shutdown commands. I tried to chain both commands together using a ';' or a '||' and these methods work well when the commandchain is issued over a normal shell. It is certain that one command will always fail and the other will succeed when its working correctly. However in homebridge-wol, the library that is used for issuing the command (the execSync function) immediately returns once the first part of the command chain fails. This means that I can't chain these two commands together :-(

Is there any solution for this problem? I could not think of anything without having to modify the code, but I thought I should ask before I make a pull request...