Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1208,6 +1208,7 @@ if(DPKG_PROGRAM)
set(CPACK_DEBIAN_RUNTIME_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.deb")
set(CPACK_DEBIAN_RUNTIME_PACKAGE_CONTROL_EXTRA
${PROJECT_SOURCE_DIR}/cpack/debian/conffiles
${PROJECT_SOURCE_DIR}/cpack/debian/prerm
)

if(FLB_RUN_LDCONFIG)
Expand Down
12 changes: 12 additions & 0 deletions cpack/debian/prerm
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#!/bin/bash
#!/bin/sh


set -e

if [[ $1 == "remove" ]]; then
systemctl stop fluent-bit.service || true
systemctl disable fluent-bit.service || true
Comment on lines +6 to +7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we check whether service or systemctl command is effective on the Debian box?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! I will test it on Debian 11 and 12 and reply back with results.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests have been successfully done on debian bullseye and bookworm versions.
After Debian 8 systemd is the default init system for debian (Debian Reference) so systemctl would not make any issues.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds great. So, we shouldn't consider the outdated Debian system. Let's leave as-is.

else
echo "Unknown Argument! $1" || false
fi

exit 0