diff --git a/debian/postinst b/debian/postinst index 22f3432..4720978 100755 --- a/debian/postinst +++ b/debian/postinst @@ -48,7 +48,7 @@ case "$1" in venv/bin/pip install -r /opt/sensorpajen/requirements.txt else echo "Warning: requirements.txt not found, installing bluepy and paho-mqtt directly" - venv/bin/pip install bluepy paho-mqtt + venv/bin/pip install bluepy paho-mqtt pybluez fi if [ $? -ne 0 ]; then @@ -56,6 +56,15 @@ case "$1" in exit 1 fi + # Install sensorpajen package itself + echo "Installing sensorpajen application..." + cd /opt/sensorpajen + venv/bin/pip install --no-deps . || { + echo "Error: Failed to install sensorpajen package" + exit 1 + } + cd / + # Set ownership of application directory BEFORE setting capabilities chown -R sensorpajen:sensorpajen /opt/sensorpajen