HEX
Server: Apache/2.4.65 (Debian)
System: Linux srv39710 6.1.0-41-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.158-1 (2025-11-09) x86_64
User: root (0)
PHP: 8.4.11
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
Upload Files
File: //var/lib/dpkg/info/ntpsec.postrm
#!/bin/sh

set -e

# These are included manually, as the postinst needs custom ordering.
dpkg-maintscript-helper mv_conffile /etc/default/ntp /etc/default/ntpsec 1.1.0\+dfsg1-2\~ ntpsec -- "$@"
dpkg-maintscript-helper mv_conffile /etc/init.d/ntp /etc/init.d/ntpsec 1.1.0\+dfsg1-2\~ ntpsec -- "$@"
dpkg-maintscript-helper mv_conffile /etc/ntp.conf /etc/ntpsec/ntp.conf 1.1.0\+dfsg1-2\~ ntpsec -- "$@"

installinit_error() {
	exit $?
}

# Automatically added by dh_installinit/13.11.4
if [ "$1" = "remove" ] && [ -x "/etc/init.d/ntpsec" ] ; then
	chmod -x "/etc/init.d/ntpsec" >/dev/null || true
fi
if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = "purge" ] ; then
	update-rc.d ntpsec remove >/dev/null
fi
# End automatically added section
# Automatically added by dh_installsystemd/13.11.4
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.11.4
if [ "$1" = "purge" ]; then
	if [ -x "/usr/bin/deb-systemd-helper" ]; then
		deb-systemd-helper purge 'ntpsec-rotate-stats.timer' 'ntpsec-systemd-netif.path' 'ntpsec.service' >/dev/null || true
	fi
fi
# End automatically added section
# Automatically added by dh_apparmor/3.0.8-3
if [ "$1" = "purge" ] && ! [ -e "/etc/apparmor.d/usr.sbin.ntpd" ] ; then
    rm -f "/etc/apparmor.d/disable/usr.sbin.ntpd" || true
    rm -f "/etc/apparmor.d/force-complain/usr.sbin.ntpd" || true
    rm -f "/etc/apparmor.d/local/usr.sbin.ntpd" || true
    rm -f /var/cache/apparmor/*/"usr.sbin.ntpd" || true
    rmdir /etc/apparmor.d/disable 2>/dev/null || true
    rmdir /etc/apparmor.d/local   2>/dev/null || true
    rmdir /etc/apparmor.d         2>/dev/null || true
fi
# End automatically added section


if [ "$1" = "purge" ]; then
	rm -f /etc/systemd/system/ntpsec.timer
	rm -rf /var/lib/ntpsec/ntp.drift /var/log/ntpsec
	rmdir /var/lib/ntpsec 2> /dev/null || true
	if ! LANG=C dpkg -s ntpsec-ntpviz 2> /dev/null | \
	     grep -qE "^Status: (hold|install)"; then
		deluser --system --quiet ntpsec || true
	fi
fi