From b606710edf96fae44b2b980125e330285df4ab84 Mon Sep 17 00:00:00 2001
From: Patrick Jentsch
Date: Thu, 19 Nov 2020 12:29:40 +0100
Subject: [PATCH] Do not activate the python venv, everytime you execute daemon
tasks
---
web/boot.sh | 4 ++--
web/nopaque-daemon.sh | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/web/boot.sh b/web/boot.sh
index 836e91ab..28b5013e 100755
--- a/web/boot.sh
+++ b/web/boot.sh
@@ -1,12 +1,12 @@
#!/bin/bash
+source venv/bin/activate
+
if [[ "${NOPAQUE_DAEMON_ENABLED}" == "True" ]]; then
echo "INFO Starting nopaque daemon process..."
./nopaque-daemon.sh &
fi
-source venv/bin/activate
-
if [[ "${#}" -eq 0 ]]; then
while true; do
flask deploy
diff --git a/web/nopaque-daemon.sh b/web/nopaque-daemon.sh
index 7a903646..bf2262dc 100755
--- a/web/nopaque-daemon.sh
+++ b/web/nopaque-daemon.sh
@@ -1,6 +1,7 @@
#!/bin/bash
-source venv/bin/activate
+# The nopaque daemon is essentially just a loop in which the daemon tasks are
+# periodically executed
while true; do
flask tasks
sleep 10