403Webshell
Server IP : 13.213.54.232  /  Your IP : 216.73.216.192
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ip-172-31-17-110 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 7.1.33-67+ubuntu22.04.1+deb.sury.org+1
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/self/root/var/lib/dpkg/info/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/var/lib/dpkg/info/chrony.postinst
#!/bin/sh
# postinst script for chrony
#
# see: dh_installdeb(1)

set -e


# targets: configure|abort-upgrade|abort-remove|abort-deconfigure

case "$1" in
    configure)

        adduser --force-badname \
                --system \
                --group \
                --quiet \
                --gecos "Chrony daemon" \
                --home /var/lib/chrony \
                --no-create-home _chrony

        if command -v ucf >/dev/null
        then
            ucf --three-way /usr/share/chrony/chrony.conf /etc/chrony/chrony.conf
            ucf --three-way /usr/share/chrony/chrony.keys /etc/chrony/chrony.keys
            if [ -x "$(command -v ucfr)" ]; then
                ucfr chrony /etc/chrony/chrony.conf
                ucfr chrony /etc/chrony/chrony.keys
            fi
        fi

        # Change the user and group ownership of "/var/l{ib,og}/chrony" iif
        # the chronyd's configuration does not contain the "user" directive.
        # Also, update these directories' mode bits to 0750 to follow upstream.
        if ! chronyd -p | grep -q "^user"; then
            for d in /var/lib/chrony /var/log/chrony; do
                if ! dpkg-statoverride --list "$d" >/dev/null; then
                    dpkg-statoverride --update --add _chrony _chrony 0750 "$d"
                fi
            done
        fi

        if [ -n "$2" ] && dpkg --compare-versions "$2" lt 4.0~pre4-1; then
            # Migrate NTP sources obtained from DHCP to /run/chrony-dhcp
            mkdir -p /run/chrony-dhcp
            for file in $(find /var/lib/dhcp/ -type f -name "chrony.servers.*"); do
                sed 's/.*/server &/' < "$file" > /run/chrony-dhcp/"${file##*servers.}.sources"
            done

            # Remove the staled PID file resulting from migrating its path from
            # /run to /run/chrony/. Overriding dh_installinit and
            # dh_systemd_start to use the --no-restart-after-upgrade option
            # was a possibility but chronyd would have been down even longer
            # during the upgrade.
            rm -f /run/chronyd.pid
        fi
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

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

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

# Automatically added by dh_apparmor/3.0.3-0ubuntu6
if [ "$1" = "configure" ]; then
    APP_PROFILE="/etc/apparmor.d/usr.sbin.chronyd"
    if [ -f "$APP_PROFILE" ]; then
        # Add the local/ include
        LOCAL_APP_PROFILE="/etc/apparmor.d/local/usr.sbin.chronyd"

        test -e "$LOCAL_APP_PROFILE" || {
            mkdir -p `dirname "$LOCAL_APP_PROFILE"`
            install --mode 644 /dev/null "$LOCAL_APP_PROFILE"
        }

        # Reload the profile, including any abstraction updates
        if aa-enabled --quiet 2>/dev/null; then
            apparmor_parser -r -T -W "$APP_PROFILE" || true
        fi
    fi
fi
# End automatically added section
# Automatically added by dh_installdeb/13.5.2ubuntu1
dpkg-maintscript-helper rm_conffile /etc/NetworkManager/dispatcher.d/20-chrony 3.5-7\~ chrony -- "$@"
# End automatically added section
# Automatically added by dh_installinit/13.5.2ubuntu1
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
	if [ -z "${DPKG_ROOT:-}" ] && [ -x "/etc/init.d/chrony" ]; then
		update-rc.d chrony defaults >/dev/null
		invoke-rc.d --skip-systemd-native chrony restart || exit 1
	fi
fi
# End automatically added section
# Automatically added by dh_installsystemd/13.5.2ubuntu1
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
	# This will only remove masks created by d-s-h on package removal.
	deb-systemd-helper unmask 'chrony.service' >/dev/null || true

	# was-enabled defaults to true, so new installations run enable.
	if deb-systemd-helper --quiet was-enabled 'chrony.service'; then
		# Enables the unit on first installation, creates new
		# symlinks on upgrades if the unit file has changed.
		deb-systemd-helper enable 'chrony.service' >/dev/null || true
	else
		# Update the statefile to add new symlinks (if any), which need to be
		# cleaned up on purge. Also remove old symlinks.
		deb-systemd-helper update-state 'chrony.service' >/dev/null || true
	fi
fi
# End automatically added section
# Automatically added by dh_installsystemd/13.5.2ubuntu1
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
	if [ -z "${DPKG_ROOT:-}" ] && [ -d /run/systemd/system ]; then
		systemctl --system daemon-reload >/dev/null || true
		deb-systemd-invoke restart 'chrony.service' >/dev/null || true
	fi
fi
# End automatically added section


exit 0

Youez - 2016 - github.com/yon3zu
LinuXploit