From 32aba1e75dcf0bb704465e35ba858275be3c9600 Mon Sep 17 00:00:00 2001 From: Ivan Usov Date: Mon, 30 Jan 2023 16:39:08 +0100 Subject: [PATCH] Update startup scripts --- scripts/pyzebra-test-start.sh | 4 ---- scripts/pyzebra-test.service | 4 ++-- scripts/pyzebra-test.sh | 4 ++++ scripts/pyzebra.service | 2 +- scripts/{pyzebra-start.sh => pyzebra.sh} | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) delete mode 100644 scripts/pyzebra-test-start.sh create mode 100644 scripts/pyzebra-test.sh rename scripts/{pyzebra-start.sh => pyzebra.sh} (50%) diff --git a/scripts/pyzebra-test-start.sh b/scripts/pyzebra-test-start.sh deleted file mode 100644 index b0e9c4b..0000000 --- a/scripts/pyzebra-test-start.sh +++ /dev/null @@ -1,4 +0,0 @@ -source /home/pyzebra/miniconda3/etc/profile.d/conda.sh - -conda activate test -python ~/pyzebra/pyzebra/app/cli.py --allow-websocket-origin=pyzebra.psi.ch:5006 --spind-path=/home/pyzebra/spind diff --git a/scripts/pyzebra-test.service b/scripts/pyzebra-test.service index 99516f5..466accb 100644 --- a/scripts/pyzebra-test.service +++ b/scripts/pyzebra-test.service @@ -1,10 +1,10 @@ [Unit] -Description=pyzebra-test web server (runs on port 5006) +Description=pyzebra-test web server [Service] Type=simple User=pyzebra -ExecStart=/bin/bash /usr/local/sbin/pyzebra-test-start.sh +ExecStart=/bin/bash /usr/local/sbin/pyzebra-test.sh Restart=always [Install] diff --git a/scripts/pyzebra-test.sh b/scripts/pyzebra-test.sh new file mode 100644 index 0000000..30ade45 --- /dev/null +++ b/scripts/pyzebra-test.sh @@ -0,0 +1,4 @@ +source /opt/miniconda3/etc/profile.d/conda.sh + +conda activate test +python /opt/pyzebra/pyzebra/app/cli.py --port=5010 --allow-websocket-origin=pyzebra.psi.ch:5010 --spind-path=/opt/spind diff --git a/scripts/pyzebra.service b/scripts/pyzebra.service index 0cfd5e9..1fc4190 100644 --- a/scripts/pyzebra.service +++ b/scripts/pyzebra.service @@ -3,7 +3,7 @@ Description=pyzebra web server [Service] Type=simple -ExecStart=/bin/bash /usr/local/sbin/pyzebra-start.sh +ExecStart=/bin/bash /usr/local/sbin/pyzebra.sh Restart=always [Install] diff --git a/scripts/pyzebra-start.sh b/scripts/pyzebra.sh similarity index 50% rename from scripts/pyzebra-start.sh rename to scripts/pyzebra.sh index d1211ea..d98acaa 100644 --- a/scripts/pyzebra-start.sh +++ b/scripts/pyzebra.sh @@ -1,4 +1,4 @@ -source /home/pyzebra/miniconda3/etc/profile.d/conda.sh +source /opt/miniconda3/etc/profile.d/conda.sh conda activate prod -pyzebra --port=80 --allow-websocket-origin=pyzebra.psi.ch:80 --spind-path=/home/pyzebra/spind +pyzebra --port=80 --allow-websocket-origin=pyzebra.psi.ch:80 --spind-path=/opt/spind