AnonSec Shell
Server IP : 104.21.14.48  /  Your IP : 3.12.148.210   [ Reverse IP ]
Web Server : Apache
System : Linux b70eb322-3aee-0c53-7c82-0db91281f2c6.secureserver.net 6.1.90-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 2 12:09:22 EDT 2024 x86_64
User : root ( 0)
PHP Version : 8.0.30.2
Disable Function : NONE
Domains : 0 Domains
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /etc/init.d/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /etc/init.d/local
#!/sbin/openrc-run
# Copyright (c) 2007-2015 The OpenRC Authors.
# See the Authors file at the top-level directory of this distribution and
# https://github.com/OpenRC/openrc/blob/HEAD/AUTHORS
#
# This file is part of OpenRC. It is subject to the license terms in
# the LICENSE file found in the top-level directory of this
# distribution and at https://github.com/OpenRC/openrc/blob/HEAD/LICENSE
# This file may not be copied, modified, propagated, or distributed
# except according to the terms contained in the LICENSE file.

conf_d_dir="${RC_SERVICE%/*/*}/conf.d"
local_d_dir="${RC_SERVICE%/*/*}/local.d"

description="Executes user programs in ${local_d_dir}"

depend()
{
	after *
	keyword -timeout
}

start()
{
	local file has_errors redirect retval
	has_errors=0
	yesno $rc_verbose || redirect='> /dev/null 2>&1'
	ebegin "Starting local"
	eindent
	for file in "${local_d_dir}"/*.start; do
		if [ -x "${file}" ]; then
			vebegin "Executing \"${file}\""
			eval "${file}" $redirect
			retval=$?
			if [ ${retval} -ne 0 ]; then
				has_errors=1
			fi
			veend ${retval} "Execution of \"${file}\" failed."
		fi
	done
	eoutdent

	if command -v local_start >/dev/null 2>&1; then
		ewarn "\"${conf_d_dir}/local\" should be removed."
		ewarn "Please move the code from the local_start function"
		ewarn "to executable scripts with an .start extension"
		ewarn "in \"${local_d_dir}\""
		local_start
	fi

	eend ${has_errors}

	# We have to end with a zero exit code, because a failed execution
	# of an executable ${local_d_dir}/*.start file shouldn't result in
	# marking the local service as failed. Otherwise we are unable to
	# execute any executable ${local_d_dir}/*.stop file, because a failed
	# marked service cannot be stopped (and the stop function would
	# actually call the executable ${local_d_dir}/*.stop file(s)).
	return 0
}

stop()
{
	local file has_errors redirect retval
	has_errors=0
	yesno $rc_verbose || redirect='> /dev/null 2>&1'
	ebegin "Stopping local"
	eindent
	for file in "${local_d_dir}"/*.stop; do
		if [ -x "${file}" ]; then
			vebegin "Executing \"${file}\""
			eval "${file}" $redirect
			retval=$?
			if [ ${retval} -ne 0 ]; then
				has_errors=1
			fi
			veend ${retval} "Execution of \"${file}\" failed."
		fi
	done
	eoutdent

	if command -v local_stop >/dev/null 2>&1; then
		ewarn "\"${conf_d_dir}/local\" should be removed."
		ewarn "Please move the code from the local_stop function"
		ewarn "to executable scripts with an .stop extension"
		ewarn "in \"${local_d_dir}\""
		local_stop
	fi

	eend ${has_errors}

	# An executable ${local_d_dir}/*.stop file which failed with a
	# non-zero exit status is not a reason to mark this service
	# as failed, therefore we have to end with a zero exit code.
	return 0
}

Anon7 - 2022
AnonSec Team