about summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorJaka Hudoklin <jakahudoklin@gmail.com>2015-02-23 20:39:33 +0100
committerJaka Hudoklin <jakahudoklin@gmail.com>2015-02-23 20:40:13 +0100
commit1cddb5be20bc52ec6b7d765bad177d19c3514833 (patch)
tree76fa7a03618d6de9cca571b6108cbd374a7cba30 /nixos/modules
parentaa91480f45c21fc238e271716c6795c175de6753 (diff)
downloadnixlib-1cddb5be20bc52ec6b7d765bad177d19c3514833.tar
nixlib-1cddb5be20bc52ec6b7d765bad177d19c3514833.tar.gz
nixlib-1cddb5be20bc52ec6b7d765bad177d19c3514833.tar.bz2
nixlib-1cddb5be20bc52ec6b7d765bad177d19c3514833.tar.lz
nixlib-1cddb5be20bc52ec6b7d765bad177d19c3514833.tar.xz
nixlib-1cddb5be20bc52ec6b7d765bad177d19c3514833.tar.zst
nixlib-1cddb5be20bc52ec6b7d765bad177d19c3514833.zip
mongodb: remove lock file on restart
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/databases/mongodb.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/modules/services/databases/mongodb.nix b/nixos/modules/services/databases/mongodb.nix
index 02e44ad88704..14ffdad9217d 100644
--- a/nixos/modules/services/databases/mongodb.nix
+++ b/nixos/modules/services/databases/mongodb.nix
@@ -120,6 +120,7 @@ in
         };
 
         preStart = ''
+          rm ${cfg.dbpath}/mongod.lock || true
           if ! test -e ${cfg.dbpath}; then
               install -d -m0700 -o ${cfg.user} ${cfg.dbpath}
           fi