From d53bffcab982dafa0d26421689c014b9f765abf4 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Sat, 29 Jun 2024 13:49:31 +1000 Subject: [PATCH] allow this to work in padev container (e.g. run as mythtv) --- wrapper.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/wrapper.sh b/wrapper.sh index e4a2f25..a9f9d83 100755 --- a/wrapper.sh +++ b/wrapper.sh @@ -6,10 +6,7 @@ if [ "$ENV" == "production" ]; then su mythtv -g mythtv -c 'ENV="production" python3 -u /code/pa_job_manager.py' &> /var/log/pa_job_manager.out & gunicorn --bind=0.0.0.0:80 --workers=4 --threads=16 main:app --env ENV="production" --error-logfile gunicorn.error.log --access-logfile gunicorn.log --capture-output elif [ "$ENV" == "container" ]; then - cd /home/ddp/src/photoassistant/ - # add ddp quickly to container so we can run the job manager as ddp and write to the files - echo "ddp:x:1000:1000:Damien De Paoli,,,:/home/ddp:/bin/bash" >> /etc/passwd - ENV="container" sudo -u ddp python3 -u pa_job_manager.py & + ENV="container" sudo -u mythtv python3 -u pa_job_manager.py & gunicorn --bind=0.0.0.0:80 --workers=1 --threads=1 main:app --env ENV="container" --reload --capture-output else echo "Not sure which ENV ($ENV) we are running, set up for DEV and dont run job manager (jic)"