Skip to content

Commit efa6524

Browse files
authored
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.
1 parent cbb753f commit efa6524

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.scripts/postinst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ useradd --system \
1010
--comment "MongoDB Exporter" \
1111
mongodb_exporter
1212

13-
systemctl daemon-reload > dev/null || exit $?
13+
systemctl --system daemon-reload >/dev/null || true
1414

1515
exit 0

0 commit comments

Comments
 (0)