From 3d823ab09933b151dd5447d98f6f1a98113e1d67 Mon Sep 17 00:00:00 2001 From: MunyDev Date: Fri, 24 Jan 2025 21:52:48 -0500 Subject: [PATCH] Added start_server.sh finally --- start_server.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 start_server.sh diff --git a/start_server.sh b/start_server.sh new file mode 100644 index 0000000..c66fe73 --- /dev/null +++ b/start_server.sh @@ -0,0 +1,17 @@ +#!/bin/bash +echo "$@" +SCRIPTDIR=$(readlink -f "$(dirname "$0")") +echo "Script directory: $SCRIPTDIR" +pushd "${SCRIPTDIR}" || exit +echo "now in scriptdir" +if [ ! -e ".venv" ] +then + python3 -m venv .venv +fi + +source .venv/bin/activate +pip3 install -r requirements.txt &> /dev/null +python3 "$SCRIPTDIR"/server.py & +# echo "Server PID: $!" +echo $! > pid +popd || exit 0 \ No newline at end of file