summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Egesdahl <ryan.egesdahl@mongodb.com>2020-11-23 13:19:47 -0800
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-12-08 22:13:39 +0000
commitb11f0546ede0a6894d23e9b5435d35be9426af9e (patch)
treeb9c6e0b98ac94570c8f3afe1c866435fed801c61
parent7feae2d6b3d8307a8ea47ea17764d827811e7c69 (diff)
downloadmongo-b11f0546ede0a6894d23e9b5435d35be9426af9e.tar.gz
SERVER-52806 Don't assume systemd on all Debian systems
(cherry picked from commit 0e69ddaa39b360d4083a55041b2f792c1cd61ec5) (cherry picked from commit c18a49d65c2488745694e17ed5d93e4601ce1174) (cherry picked from commit f3e9474a1482f4de4454480150ec77139c6e626f)
-rw-r--r--debian/mongodb-enterprise-server.postinst4
-rw-r--r--debian/mongodb-enterprise-unstable-server.postinst4
-rw-r--r--debian/mongodb-org-server.postinst4
-rw-r--r--debian/mongodb-org-unstable-server.postinst4
4 files changed, 12 insertions, 4 deletions
diff --git a/debian/mongodb-enterprise-server.postinst b/debian/mongodb-enterprise-server.postinst
index 40f5976c044..a09e41f8edf 100644
--- a/debian/mongodb-enterprise-server.postinst
+++ b/debian/mongodb-enterprise-server.postinst
@@ -40,7 +40,9 @@ case "$1" in
fi
# Check for changes to the service file
- systemctl daemon-reload
+ if $(command systemctl --help >/dev/null); then
+ systemctl daemon-reload
+ fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
diff --git a/debian/mongodb-enterprise-unstable-server.postinst b/debian/mongodb-enterprise-unstable-server.postinst
index 40f5976c044..a09e41f8edf 100644
--- a/debian/mongodb-enterprise-unstable-server.postinst
+++ b/debian/mongodb-enterprise-unstable-server.postinst
@@ -40,7 +40,9 @@ case "$1" in
fi
# Check for changes to the service file
- systemctl daemon-reload
+ if $(command systemctl --help >/dev/null); then
+ systemctl daemon-reload
+ fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
diff --git a/debian/mongodb-org-server.postinst b/debian/mongodb-org-server.postinst
index 40f5976c044..a09e41f8edf 100644
--- a/debian/mongodb-org-server.postinst
+++ b/debian/mongodb-org-server.postinst
@@ -40,7 +40,9 @@ case "$1" in
fi
# Check for changes to the service file
- systemctl daemon-reload
+ if $(command systemctl --help >/dev/null); then
+ systemctl daemon-reload
+ fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
diff --git a/debian/mongodb-org-unstable-server.postinst b/debian/mongodb-org-unstable-server.postinst
index 40f5976c044..a09e41f8edf 100644
--- a/debian/mongodb-org-unstable-server.postinst
+++ b/debian/mongodb-org-unstable-server.postinst
@@ -40,7 +40,9 @@ case "$1" in
fi
# Check for changes to the service file
- systemctl daemon-reload
+ if $(command systemctl --help >/dev/null); then
+ systemctl daemon-reload
+ fi
;;
abort-upgrade|abort-remove|abort-deconfigure)