1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 19:52:06 +00:00
iiab/roles/mongodb/templates/iiab-mongodb-repair-if-no-lock.j2

9 lines
377 B
Django/Jinja

#!/bin/bash
# 2022-06-07: 100% BOGUS+USELESS with MongoDB 4+ -- SEE mongodb.service & #3236
if [ -f {{ mongodb_db_lock_file }} ]; then
echo '"mongod --repair" cannot run when {{ mongodb_db_lock_file }} present.' >&2 # Output to STDERR but keep going, so /etc/systems/system/mongodb.service continues
else
/usr/bin/mongod --repair --dbpath {{ mongodb_db_path }}
fi