ThomDietrich / miflora-mqtt-daemon

Linux service to collect and transfer Xiaomi Mi Flora plant sensor data via MQTT to your smart home system, with cluster support 🌱🌼πŸ₯€πŸ‘🌳
MIT License
610 stars 140 forks source link

make the script executable #130

Closed individual-it closed 3 years ago

individual-it commented 4 years ago

after a long time I came back to this (it has been so long because the script just works and did not need any interaction) I noticed that the script does not have the x permission set, so running the script as described in https://github.com/ThomDietrich/miflora-mqtt-daemon#execution does work (with python3 in front of it) but the daemon has difficulties to start it

-- Unit miflora.service has begun starting up.
Oct 01 02:53:45 raspberrypi systemd[2910]: miflora.service: Failed at step EXEC spawning /opt/miflora-mqtt-daemon/miflora-mqtt-daemon.py: Permission denied
-- Subject: Process /opt/miflora-mqtt-daemon/miflora-mqtt-daemon.py could not be executed
-- Defined-By: systemd
-- Support: https://www.debian.org/support

alternatively I can change the documentation and mention that the execute permission should be set

ThomDietrich commented 3 years ago

Went with the explicit call via python3 as permissions like to be messed up over the course of working via git and on different systems :) No harm in merging this though. Thanks