Added start_server.sh finally
This commit is contained in:
parent
960e5574d0
commit
3d823ab099
17
start_server.sh
Normal file
17
start_server.sh
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user