File tree 1 file changed +7
-8
lines changed
1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -e
3
3
4
- # Restore the database if it does not already exist.
5
- if [[ -f " ${DB_PATH} " || " ${UPTIME_KUMA_DB_TYPE} " != ' mariadb' ]]; then
6
- echo " Database already exists, skipping restore"
7
- else
8
- echo " No database found, restoring from replica if exists"
9
- litestream restore -if-replica-exists -o " ${DB_PATH} " " ${REPLICA_URL} "
10
- fi
11
-
12
4
if [[ " ${UPTIME_KUMA_DB_TYPE} " != ' mariadb' ]]; then
13
5
exec node server/server.js
14
6
else
7
+ # Restore the database if it does not already exist.
8
+ if [[ -f " ${DB_PATH} " ]]; then
9
+ echo " Database already exists, skipping restore"
10
+ else
11
+ echo " No database found, restoring from replica if exists"
12
+ litestream restore -if-replica-exists -o " ${DB_PATH} " " ${REPLICA_URL} "
13
+ fi
15
14
# Run litestream with your app as the subprocess.
16
15
exec litestream replicate -exec " node server/server.js"
17
16
fi
You can’t perform that action at this time.
0 commit comments