HEX
Server: nginx/1.24.0
System: Linux prod-btpayments-io 6.14.0-1018-aws #18~24.04.1-Ubuntu SMP Mon Nov 24 19:46:27 UTC 2025 x86_64
User: ubuntu (1000)
PHP: 8.3.19
Disabled: NONE
Upload Files
File: //var/lib/dpkg/info/vnstat.postrm
#!/bin/sh

set -eu

case "$1" in
  remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
    ;;

  purge)
    userdel vnstat || true
    ;;

  *)
    echo "postrm called with unknown argument \`$1'" >&2
    exit 1
esac

# Automatically added by dh_installinit/13.13ubuntu1
if [ "$1" = "remove" ] && [ -x "/etc/init.d/vnstat" ] ; then
	chmod -x "/etc/init.d/vnstat" >/dev/null || true
fi
if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = "purge" ] ; then
	update-rc.d vnstat remove >/dev/null
fi
# End automatically added section
# Automatically added by dh_cruft/0.9.60
if [ "$1" = "purge" ]
then
    # we need to glob, so no quotes
    rm -rf /var/lib/vnstat/
fi
# End automatically added section
# Automatically added by dh_installsystemd/13.13ubuntu1
if [ "$1" = remove ] && [ -d /run/systemd/system ] ; then
	systemctl --system daemon-reload >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_installsystemd/13.13ubuntu1
if [ "$1" = "purge" ]; then
	if [ -x "/usr/bin/deb-systemd-helper" ]; then
		deb-systemd-helper purge 'vnstat.service' >/dev/null || true
	fi
fi
# End automatically added section