Skip to content

Commit

Permalink
fix: failed to uninstall in low version of systemd.
Browse files Browse the repository at this point in the history
In older versions, it is not `--kill-whom` but `--kill-who`.
  • Loading branch information
ice909 committed Feb 25, 2025
1 parent 959ce46 commit 682b080
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion debian/linglong-bin.postrm
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,10 @@ if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = remove ] && [ -d /run/systemd/system ] ;
# orgin script from postrm-systemd-user-reload-only
# deb-systemd-invoke --user --no-dbus daemon-reload >/dev/null || true

systemctl --quiet kill --kill-whom=main --signal SIGHUP user@*.service
systemd_version=$(systemctl --version | head -n 1 | awk '{print $2}')
if [ "$systemd_version" -ge 252 ]; then
systemctl --quiet kill --kill-whom=main --signal SIGHUP user@*.service
else
systemctl --quiet kill --kill-who=main --signal SIGHUP user@*.service
fi
fi

0 comments on commit 682b080

Please sign in to comment.