nixos/mongodb: fix initialScript when dbpath exists and is empty (#443005)

This commit is contained in:
Sandro
2026-03-04 01:44:53 +00:00
committed by GitHub
@@ -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