thomwolf HF staff commited on
Commit
3e624b6
·
verified ·
1 Parent(s): f82eea8

Update start.sh

Browse files
Files changed (1) hide show
  1. start.sh +6 -0
start.sh CHANGED
@@ -4,6 +4,12 @@ set -x -e
4
  echo "Creating data directory..."
5
  mkdir -p /data/db
6
 
 
 
 
 
 
 
7
  echo "Starting MongoDB..."
8
  mongod --config /etc/mongod.conf &
9
 
 
4
  echo "Creating data directory..."
5
  mkdir -p /data/db
6
 
7
+ echo "Cleaning up any stale lock files..."
8
+ rm -f /data/db/mongod.lock
9
+
10
+ echo "Ensuring no MongoDB process is running..."
11
+ pkill mongod || true # 'true' ensures script continues if no process found
12
+
13
  echo "Starting MongoDB..."
14
  mongod --config /etc/mongod.conf &
15