Mercurial > repos > gga > genenotebook_genenotebook_build
comparison launch_gnb.sh @ 0:22f22c3e81bf draft
planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/genenotebook commit 12282c16658b37858f49944796fd95515ef0fc0b
author | gga |
---|---|
date | Wed, 11 Jan 2023 11:49:13 +0000 |
parents | |
children | f415e44e71de |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:22f22c3e81bf |
---|---|
1 #!/bin/bash | |
2 | |
3 set -e | |
4 | |
5 mongod --dbpath ./mongo_db/ --unixSocketPrefix `pwd` --bind_ip fake_socket --logpath ./mongod.log --pidfilepath ./mongo.pid & | |
6 | |
7 sleep 5 | |
8 | |
9 # "waiting for connections on port" is for mongodb 4x | |
10 #if ! grep -q "waiting for connections on port" ./mongod.log; then | |
11 # "Listening on" is for mongodb 5x | |
12 if ! grep -q "Listening on" ./mongod.log; then | |
13 echo "Failed to launch MongoDB:" 1>&2; | |
14 cat ./mongod.log 1>&2; | |
15 kill $GNB_PID; | |
16 exit 1; | |
17 fi; | |
18 | |
19 TMP_STORAGE=$(pwd)/tmp_storage | |
20 mkdir "$TMP_STORAGE" | |
21 | |
22 genenotebook run --storage-path "$TMP_STORAGE" --port ${GNB_PORT} --mongo-url mongodb://$MONGO_URI%2Fmongodb-27017.sock/genenotebook > ./gnb.log 2>&1 & | |
23 | |
24 export GNB_PID=$! | |
25 | |
26 sleep 15 | |
27 | |
28 if ! grep -q "GeneNoteBook server started, serving" ./gnb.log; then | |
29 echo "Failed to launch GeneNoteBook:" 1>&2; | |
30 cat ./gnb.log 1>&2; | |
31 kill $GNB_PID $(<"./mongo.pid"); | |
32 exit 1; | |
33 fi; |