-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlaunch_TiledViz
More file actions
executable file
·31 lines (27 loc) · 1.5 KB
/
Copy pathlaunch_TiledViz
File metadata and controls
executable file
·31 lines (27 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
source $HOME/.cache/envTiledViz
export PythonVENV=./TiledVizEnv_${DATE}
export PGGSSENCODEMODE=disable
rm TVSecure.log TVWeb/TiledViz.log
docker container ls -a --filter=name=flaskdock && docker container ls -a -q --filter=name=flaskdock |xargs docker rm -f -v
if [ X$(docker ps -a| grep "mageiaconnect"|sed -e 's/\([0-9a-z]*\) .*/\1/' |wc -l) != X"" ]; then
docker ps -a| grep "mageiaconnect" |sed -e 's/\([0-9a-z]*\) .*/\1/' |xargs docker rm -f
rm -Rf /tmp/connectiondock*
fi
date +%F_%H-%M-%S
pwd
source ${PythonVENV}/bin/activate
if ( $installX11 ); then
passwordFlask=$(python3 -c "import zenipy; password=zenipy.zenipy.password(title='Flask password',text='Please give a password for your Flask server : ', width=450, height=120, timeout=None); print(str(password))")
else
echo "Please give a password for your Flask server."
read -s passwordFlask;
fi
# echo "pass : " $passwordFlask
echo "==== Running ... ===="
python3 TVSecure/TVSecure.py --POSTGRES_HOST=${POSTGRES_HOST} --POSTGRES_IP=${POSTGRES_IP} --POSTGRES_PORT=${POSTGRES_PORT} \
--POSTGRES_DB=${POSTGRES_DB} --POSTGRES_USER=${POSTGRES_USER} --POSTGRES_PASSWORD=${POSTGRES_PASSWORD} \
--secretKey="$passwordFlask" --SMTP_PASSWORD=${SMTP_PASSWORD} 2>&1 \
| grep -v "DEBUG:urllib3.*" | grep -v " :running" \
| sed -e "s%TVSecure \([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9],[0-9][0-9][0-9]\) \- Thread\-\([0-9]*\) .* HTTP/1.1\" 200 None%\1 \2%" | grep -v " 1 " | grep -v 404
echo "Exit :" $?