File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 22
33set -e
44
5+ if [ -f " /var/lib/postgresql/data/PG_VERSION" ]; then
6+ # 如果是v1版本一键安装的的目录则退出
7+ echo " The existing data is from v1 and is not compatible with v2, installing v2 over v1 is not supported."
8+ echo " The process will now exit."
9+ exit 1
10+ fi
11+
512if [ " $MAXKB_DB_HOST " = " 127.0.0.1" ]; then
613 echo " PostgreSQL starting..."
714 /usr/bin/start-postgres.sh &
15+ postgres_pid=$!
816 sleep 10
917 wait-for-it 127.0.0.1:5432 --timeout=120 --strict -- echo " PostgreSQL started."
1018fi
1119
1220if [ " $MAXKB_REDIS_HOST " = " 127.0.0.1" ]; then
1321 echo " Redis starting..."
1422 /usr/bin/start-redis.sh &
23+ redis_pid=$!
1524 sleep 5
1625 wait-for-it 127.0.0.1:6379 --timeout=60 --strict -- echo " Redis started."
1726fi
1827
19- /usr/bin/start-maxkb.sh
28+ /usr/bin/start-maxkb.sh &
29+ maxkb_pid=$!
30+
31+ wait -n
32+ kill $postgres_pid $redis_pid $maxkb_pid 2> /dev/null
33+ wait
Original file line number Diff line number Diff line change @@ -4,4 +4,5 @@ mkdir -p /opt/maxkb/logs
44mkdir -p /opt/maxkb/local
55mkdir -p /opt/maxkb/python-packages
66
7+ rm -f /opt/maxkb-app/tmp/* .pid
78python /opt/maxkb-app/main.py start
You can’t perform that action at this time.
0 commit comments