From 4bdc55b46deeca307c2a261a40be130098359404 Mon Sep 17 00:00:00 2001 From: pedro Date: Wed, 25 Sep 2024 13:40:00 -0300 Subject: [PATCH] deploy-workbench: detect nfs env --- deploy-workbench.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/deploy-workbench.sh b/deploy-workbench.sh index 283d0f5..7111840 100755 --- a/deploy-workbench.sh +++ b/deploy-workbench.sh @@ -269,7 +269,13 @@ stty -echo # Do not show what we type in terminal so it does not meddle with our dmesg -n 1 # Do not report *useless* system messages to the terminal # clearly specify the right working directory, used in the python script as os.getcwd() cd /mnt -pipenv run python /opt/workbench/workbench-script.py --config "/mnt/settings/settings.ini" +# detect pxe env +if [ -d /run/live/medium ]; then + config_path='/run/live/medium/settings.ini' +else + config_path='/mnt/settings.ini' +fi +pipenv run python /opt/workbench/workbench-script.py --config "\${config_path}" stty echo END #TODO add some useful commands