5 # NOTE: This package name detection will only work on Debian.
6 # If this prerm script ever starts doing work on Red Hat,
7 # we'll need to adapt this code accordingly.
8 script="$(basename "${0}")"
10 systemd_unit="${pkg}.service"
14 if [ -e /run/systemd/system ]; then
15 systemctl stop "${systemd_unit}" || true
16 systemctl disable "${systemd_unit}" || true