AnonSec Shell
Server IP : 104.21.14.48  /  Your IP : 18.188.226.91   [ 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 :  /var/chroot/usr/share/openrc/support/init.d.examples/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


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

Current File : /var/chroot/usr/share/openrc/support/init.d.examples/openvpn
#!/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.

vpn=${RC_SVCNAME#*.}
name="OpenVPN"
[ "$vpn" != openvpn ] && name="$name ($vpn)"
command=/sbin/openvpn

pidfile=/var/run/"$RC_SVCNAME".pid
: ${openvpn_dir:=/etc/openvpn}
: ${openvpn_config:=$openvpn_dir/$vpn.conf}
command_args="$openvpn_args --daemon --config $openvpn_config"
command_args="$command_args --writepid $pidfile"
required_dirs=$openvpn_dir
required_files=$openvpn_config

# If we're an openvpn client, then supply a nice default config
# You can find sample up/down scripts in the OpenRC support/openvpn dir
if yesno $openvpn_client; then
	: ${openvpn_up:=${openvpn_dir}/up.sh}
	: ${openvpn_down:=${openvpn_dir}/down.sh}
	command_args="$command_args --nobind --up-delay --up-restart --down-pre"
	command_args="$command_args --up $openvpn_up"
	command_args="$command_args --down $openvpn_down"
	required_files="$required_files $openvpn_up $openvpn_down"

	in_background_fake="start stop"
	start_inactive=YES
fi

depend()
{
	need localmount net
	use dns
	after bootmisc
}

start_pre()
{
	# Linux has good dynamic tun/tap creation
	if [ "$RC_UNAME" = Linux ]; then
		if [ ! -e /dev/net/tun ]; then
			if ! modprobe tun; then
				eerror "TUN/TAP support is not available in this kernel"
				return 1
			fi
		fi
		if [ -h /dev/net/tun -a -c /dev/misc/net/tun ]; then
			ebegin "Detected broken /dev/net/tun symlink, fixing..."
			rm -f /dev/net/tun
			ln -s /dev/misc/net/tun /dev/net/tun
			eend $?
		fi
	else
		if command -v kldload >/dev/null 2>&1; then
			# Hammer the modules home by default
			sysctl -a | grep -q '\.tun\.' || kldload if_tun
			sysctl -a | grep -q '\.tap\.' || kldload if_tap
		fi
	fi

	# If the config file does not specify the cd option, we do
	if ! grep -q "^[ \t]*cd[ \t].*" "$openvpn_config"; then
		command_args="$command_args --cd $openvpn_dir"
	fi
}

Anon7 - 2022
AnonSec Team