From 4e0fc10017c97c92055c17461478825efb430240 Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 17 Jul 2018 12:51:55 -0400 Subject: [PATCH] Update mongodb.service --- roles/mongodb/templates/mongodb.service | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/mongodb/templates/mongodb.service b/roles/mongodb/templates/mongodb.service index 40f4f573f..1cfc98b05 100644 --- a/roles/mongodb/templates/mongodb.service +++ b/roles/mongodb/templates/mongodb.service @@ -6,7 +6,9 @@ After=syslog.target network.target Type=simple User=mongodb Group=mongodb +ExecStartPre=/usr/bin/mongod --repair --dbpath {{ mongodb_db_path }} ExecStart=/usr/bin/mongod -f /etc/mongod.conf +ExecStop=/usr/bin/killall mongod [Install] WantedBy=multi-user.target