We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4ab0fae commit eb1dc84Copy full SHA for eb1dc84
bin/scripts/mongodb.init.logrotate.sh
@@ -39,6 +39,23 @@ EOF
39
}
40
EOF
41
fi
42
+
43
+ if [ -f /etc/redhat-release ]; then
44
+ #mongodb might need to be started
45
+ if grep -q -i "release 6" /etc/redhat-release ; then
46
+ service mongod restart || echo "mongodb service does not exist"
47
+ else
48
+ systemctl restart mongod || echo "mongodb systemctl job does not exist"
49
+ fi
50
51
52
+ if [ -f /etc/lsb-release ]; then
53
+ if [[ "$(/sbin/init --version)" =~ upstart ]]; then
54
+ restart mongod || echo "mongodb upstart job does not exist"
55
56
57
58
59
else
60
echo 'Command logrotate is not found, continuing without logrotate setup.'
61
0 commit comments