I installed a python program from a github repo with an automatic script. It is configured to launch itself as a service on startup, and everything seems working fine. I edited the 'py' file to change and improve program, but when I save it I cannot start it anymore as service. If I ask for status it says
Process: 593 ExecStop=/usr/bin/curl http://127.0.0.1/save (code=exited, status=7) Process: 591 ExecStart=/opt/hue-emulator/HueEmulator3.py (code=exited, status=203/EXEC)
Instead, if I try to launch directly using:
sudo python3 /opt/hue-emulator/HueEmulator3.py
everything seems to works fine. What I'm doing wrong?
This is the repo: https://github.com/diyhue/diyHue
and this is the
systemctl cat hue-emulator.service output
[Unit] Description=Hue Emulator Service After=multi-user.target [Service] Type=idle Restart=always RestartSec=30 StartLimitInterval=200 StartLimitBurst=5 WorkingDirectory=/opt/hue-emulator ExecStart=/opt/hue-emulator/HueEmulator3.py ExecStop=/usr/bin/curl http://127.0.0.1/save ExecStop=/bin/sleep 1 [Install] WantedBy=multi-user.target
It seems the simple file editing cause this issue. I tried to resinstall via script, then simple add a space then save and it will not run anymore as service. To edit I use notepad++ on Windows using a shared folder via Samba. I also tried to check permissions before and after and I got:
-rwxr-xr-x (before) -rw-r-xr-x (after)
I fixed them with
chmod, but without success.