Use the upstart commands on old ubuntu.
This commit is contained in:
parent
84b92decb4
commit
91b925a0e8
|
@ -28,9 +28,15 @@ chgrp mongodb ${MONGODB_CERTFILE}
|
||||||
{% if mongodb_ssl_enabled %}
|
{% if mongodb_ssl_enabled %}
|
||||||
echo "Restart the mongod service, reload is not supported" >> "$LE_LOG_DIR/mongodb.log"
|
echo "Restart the mongod service, reload is not supported" >> "$LE_LOG_DIR/mongodb.log"
|
||||||
{% if mongodb_install_from_external_repo %}
|
{% if mongodb_install_from_external_repo %}
|
||||||
service mongod stop >> "$LE_LOG_DIR/mongodb.log" 2>&1
|
if [ -x /sbin/stop ] && [ -f /etc/init/mongod.conf ] ; then
|
||||||
sleep 10
|
/sbin/stop mongod >> "$LE_LOG_DIR/mongodb.log" 2>&1
|
||||||
service mongod start >> "$LE_LOG_DIR/mongodb.log" 2>&1
|
sleep 10
|
||||||
|
/sbin/start mongod >> "$LE_LOG_DIR/mongodb.log" 2>&1
|
||||||
|
else
|
||||||
|
service mongod stop >> "$LE_LOG_DIR/mongodb.log" 2>&1
|
||||||
|
sleep 10
|
||||||
|
service mongod start >> "$LE_LOG_DIR/mongodb.log" 2>&1
|
||||||
|
fi
|
||||||
{% else %}
|
{% else %}
|
||||||
systemctl stop mongodb >> "$LE_LOG_DIR/mongodb.log" 2>&1
|
systemctl stop mongodb >> "$LE_LOG_DIR/mongodb.log" 2>&1
|
||||||
sleep 10
|
sleep 10
|
||||||
|
|
Loading…
Reference in New Issue