From 386cd4b0a76baf6e61773135f2c4d1a57f9a3326 Mon Sep 17 00:00:00 2001 From: Ali Afsharzadeh Date: Wed, 3 Dec 2025 11:17:45 +0330 Subject: [PATCH] Use systemctl --system daemon-reload and ignore errors in postinst Ensures the postinst script does not fail if daemon-reload returns a non-zero exit code. Uses the `--system` flag to explicitly target the system manager, following the common pattern in other Debian packages. --- .scripts/postinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scripts/postinst b/.scripts/postinst index 36b7bb079..3efccb684 100755 --- a/.scripts/postinst +++ b/.scripts/postinst @@ -10,6 +10,6 @@ useradd --system \ --comment "MongoDB Exporter" \ mongodb_exporter -systemctl daemon-reload > dev/null || exit $? +systemctl --system daemon-reload >/dev/null || true exit 0