3e779be6f3
CI / lint (push) Failing after 13m4s
CI / test (3.11, ubuntu-latest) (push) Failing after 2m4s
CI / test (3.13, ubuntu-latest) (push) Successful in 13m30s
CI / test (3.14, ubuntu-latest) (push) Successful in 17m21s
CI / test (3.12, ubuntu-latest) (push) Successful in 17m55s
CI / discover-apps-ps (push) Successful in 1m56s
CI / test (3.9, ubuntu-latest) (push) Successful in 13m17s
CI / test (3.10, ubuntu-latest) (push) Successful in 26m21s
CI / audit (push) Successful in 13m38s
Deploy site / deploy (push) Has been cancelled
CI / test (3.14, ubuntu-24.04-arm) (push) Has been cancelled
45 lines
1.6 KiB
Bash
Executable File
45 lines
1.6 KiB
Bash
Executable File
#!/bin/sh
|
|
# SPDX-License-Identifier: MIT
|
|
#
|
|
# Post-remove hook for the winpodx debian package (#255 PR 4).
|
|
#
|
|
# $1 is the action: remove, purge, upgrade, failed-upgrade, abort-
|
|
# install, abort-upgrade, disappear. We hand the value off to the
|
|
# shared packaging/scripts/postrm-common.sh which normalises across
|
|
# debian / rpm / aur and runs the two-stage cleanup (process kill on
|
|
# remove, full user-cleanup on purge).
|
|
#
|
|
# The script lives at /usr/share/winpodx/packaging/postrm-common.sh
|
|
# after install (see debian/winpodx.docs + dh_install rule).
|
|
|
|
set -e
|
|
|
|
ACTION="$1"
|
|
|
|
# Bail on failed-upgrade / abort-* paths -- the package isn't actually
|
|
# going away, leave user state alone.
|
|
case "$ACTION" in
|
|
remove|purge)
|
|
# Run the common hook. Fall back to in-line minimal cleanup
|
|
# if the helper isn't installed (paranoid: should always be
|
|
# present alongside this script).
|
|
if [ -x /usr/share/winpodx/packaging/postrm-common.sh ]; then
|
|
/usr/share/winpodx/packaging/postrm-common.sh "$ACTION" || true
|
|
else
|
|
# Inline fallback: kill processes for each user. Skip the
|
|
# full cleanup -- we don't want to do that without the
|
|
# canonical 'winpodx uninstall --purge' path.
|
|
for home in /home/*; do
|
|
[ -d "$home" ] || continue
|
|
user=$(basename "$home")
|
|
runuser -u "$user" -- pkill -f 'python.*winpodx' >/dev/null 2>&1 || true
|
|
runuser -u "$user" -- pkill -f 'winpodx-app' >/dev/null 2>&1 || true
|
|
done
|
|
fi
|
|
;;
|
|
esac
|
|
|
|
#DEBHELPER#
|
|
|
|
exit 0
|