/usr/share/debhelper/autoscripts/prerm-systemd-restart is in dh-systemd 1.29ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 | if [ -d /run/systemd/system ] && [ "$1" = remove ]; then
deb-systemd-invoke stop #UNITFILES# >/dev/null
fi
|