nixos/mongodb: fix initialScript when dbpath exists and is empty (#443005)
This commit is contained in:
@@ -164,6 +164,8 @@ in
|
||||
rm ${cfg.dbpath}/mongod.lock || true
|
||||
if ! test -e ${cfg.dbpath}; then
|
||||
install -d -m0700 -o ${cfg.user} ${cfg.dbpath}
|
||||
fi
|
||||
if ! test -e ${cfg.dbpath}/storage.bson; then
|
||||
# See postStart!
|
||||
touch ${cfg.dbpath}/.first_startup
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user