SERVER-54386 Prevent install errors when systemd is not running

This commit is contained in:
Ryan Egesdahl
2021-02-15 18:06:27 -08:00
committed by Evergreen Agent
parent 5a76da986d
commit 8cf3de4ca7
4 changed files with 12 additions and 8 deletions

View File

@@ -39,9 +39,10 @@ case "$1" in
chown mongodb:mongodb /var/log/mongodb
fi
# Check for changes to the service file
# Check for changes to the service file, but ignore errors when
# systemd is not running.
if $(command systemctl --help >/dev/null); then
systemctl daemon-reload
systemctl daemon-reload || true
fi
;;

View File

@@ -39,9 +39,10 @@ case "$1" in
chown mongodb:mongodb /var/log/mongodb
fi
# Check for changes to the service file
# Check for changes to the service file, but ignore errors when
# systemd is not running.
if $(command systemctl --help >/dev/null); then
systemctl daemon-reload
systemctl daemon-reload || true
fi
;;

View File

@@ -39,9 +39,10 @@ case "$1" in
chown mongodb:mongodb /var/log/mongodb
fi
# Check for changes to the service file
# Check for changes to the service file, but ignore errors when
# systemd is not running.
if $(command systemctl --help >/dev/null); then
systemctl daemon-reload
systemctl daemon-reload || true
fi
;;

View File

@@ -39,9 +39,10 @@ case "$1" in
chown mongodb:mongodb /var/log/mongodb
fi
# Check for changes to the service file
# Check for changes to the service file, but ignore errors when
# systemd is not running.
if $(command systemctl --help >/dev/null); then
systemctl daemon-reload
systemctl daemon-reload || true
fi
;;