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

Appdaemon: Use newest python version when installing. #157

Merged
merged 1 commit into from
Apr 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion package/opt/hassbian/suites/appdaemon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ else
HOMEASSISTANT_PASSWORD=""
fi

echo "Checking python version to use..."
PYTHONVER=$(echo /usr/local/lib/*python* | awk -F/ '{print $NF}')
echo "Using $PYTHONVER..."

echo "Creating directory for AppDaemon Venv"
sudo mkdir /srv/appdaemon
sudo chown -R homeassistant:homeassistant /srv/appdaemon
Expand All @@ -32,7 +36,7 @@ echo "Changing to the homeassistant user"
sudo -u homeassistant -H /bin/bash << EOF

echo "Creating AppDaemon venv"
python3 -m venv /srv/appdaemon
$PYTHONVER -m venv /srv/appdaemon

echo "Changing to AppDaemon venv"
source /srv/appdaemon/bin/activate
Expand Down