A simple Python script which provides a Bluetooth to MQTT gateway, easily extensible via custom workers. See https://github.com/zewelor/bt-mqtt-gateway/wiki for more information.
MIT License
549
stars
116
forks
source link
Systemd Installation like in README does not work, service.sh might have superfluous sudo #259
[*] I've read the Troubleshooting Wiki, my problem is not described there and I am already using the specified minimum bluez version.
Describe the bug
When trying to install as systemd service as instructed by the README, the service gets stuck at starting with ModuleNotFoundError: No module named 'yaml', similar to #250.
To Reproduce
Steps to reproduce the behavior:
Setup the gateway with virtualenv such that it starts using ./gateway.py
Follow instructions for systemd service installation
Observe journalctl -u bt-mqtt-gateway.service
Expected behavior
Service should start.
Config
(does not apply)
Debug gateway logs
(does not apply)
Server (please complete the following information):
OS: Linux
Distro: Linux phoscon (Debian)
Version 5.10.103-v7+
Additional context
I removed the sudo from the last line of service.sh such that it looks like:
#!/bin/sh
set -e
SCRIPT_DIR=$( cd "$( dirname "$0" )" >/dev/null 2>&1 && pwd )
VIRTUAL_ENV=$SCRIPT_DIR/.venv
if [ -d "$VIRTUAL_ENV" ]; then
export VIRTUAL_ENV
PATH="$VIRTUAL_ENV/bin:$PATH"
export PATH
fi
cd "$SCRIPT_DIR"
python3 ./gateway.py "$@"
[*] I've read the Troubleshooting Wiki, my problem is not described there and I am already using the specified minimum bluez version.
Describe the bug
When trying to install as systemd service as instructed by the README, the service gets stuck at starting with
ModuleNotFoundError: No module named 'yaml'
, similar to #250.To Reproduce Steps to reproduce the behavior:
journalctl -u bt-mqtt-gateway.service
Expected behavior Service should start.
Config (does not apply)
Debug gateway logs (does not apply)
Server (please complete the following information):
Additional context
I removed the
sudo
from the last line ofservice.sh
such that it looks like:Then, it works.