luisiam / homebridge-cmdswitch2

CMD Plugin for HomeBridge (API 2.0): https://github.com/nfarina/homebridge
Apache License 2.0
176 stars 29 forks source link

Run as a service no Bash #29

Open django52 opened 6 years ago

django52 commented 6 years ago

If i use homebridge as a command, I can use the command bash /usr/local/bin/LupusecHome. It runs!

But if I use Homebridge width systemd, the bash did not response. All other is ok! Is this a problem with rights?

luisiam commented 6 years ago

I believe it has to do with permission? I run homebridge with systemd and I have no issue at all.

DanielsCode commented 6 years ago

I have a similar behavior. I use systemctl to run Homebridge as a service (https://timleland.com/setup-homebridge-to-start-on-bootup/). But if I start it as service my cmdswitch2 bash script will be killed immediately. If I start without systemcrtl everything works fine. I already changed execute permissions and ownership of my bash scripts. If I check the status of systemtcl I see my new PID from my bash-script for a couple of seconds. Then it will be killed.... Do you have any ideas?