From 7fcdb9b97586158e76ec408b0a31e3d1ea8dbfab Mon Sep 17 00:00:00 2001 From: Ryan Kraus Date: Sun, 12 Jul 2015 18:44:38 -0400 Subject: [PATCH] Updating Debian daemon script for Python Virtual Environments Fix to init.d script that forces the correct virtual environment to be loaded. --- scripts/homeassistant.daemon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/homeassistant.daemon b/scripts/homeassistant.daemon index 4c504557dec..bef4cd90f4a 100755 --- a/scripts/homeassistant.daemon +++ b/scripts/homeassistant.daemon @@ -12,7 +12,7 @@ # Created with: https://gist.github.com/naholyr/4275302#file-new-service-sh # # Installation: -# 1) Populate RUNAS and RUNDIR folders +# 1) Populate RUNAS and RUNDIR variables # 2) Create Log -- sudo touch /var/log/homeassistant.log # 3) Set Log Ownership -- sudo chown USER:GROUP /var/log/homeassistant.log # 4) Create PID File -- sudo touch /var/run/homeassistant.pid @@ -29,7 +29,7 @@ # If you are not, the SCRIPT variable must be modified to point to the correct # Python environment. -SCRIPT="./bin/python -m homeassistant" +SCRIPT="source bin/activate; ./bin/python -m homeassistant" RUNAS= RUNDIR= PIDFILE=/var/run/homeassistant.pid