Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Systemd Installation like in README does not work, service.sh might have superfluous sudo #259

Open
contradictioned opened this issue Jul 26, 2022 · 0 comments

Comments

@contradictioned
Copy link

[*] 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:

  1. Setup the gateway with virtualenv such that it starts using ./gateway.py
  2. Follow instructions for systemd service installation
  3. 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 "$@"

Then, it works.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant