HEX
Server: Apache
System: Linux dinesh8189 5.15.98-grsec-sharedvalley-2.lc.el8.x86_64 #1 SMP Thu Mar 9 09:07:30 -03 2023 x86_64
User: cgmgerenciamento1 (814285)
PHP: 8.1.26
Disabled: apache_child_terminate,dl,escapeshellarg,escapeshellcmd,exec,link,mail,openlog,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,php_check_syntax,php_strip_whitespace,popen,proc_close,proc_open,shell_exec,symlink,system
Upload Files
File: //proc/thread-self/root/proc/self/root/usr/share/cockpit/motd/update-motd
#!/bin/sh -e

# syntax: update-motd [port [hostname [ipaddr [protocol]]]]
# each argument can be given as the empty string to use the default

# port number from cmdline, then systemctl file, then 9090
# take the last Listen line; this will be the user-specified one
port=${1:-$(systemctl show --property Listen cockpit.socket |
              sed -E '$!d;$s/.*[^0-9]([0-9]+).*/\1/;')}
port=${port:-9090}

# hostname from cmdline, then `hostname -f`
hostname=${2:-$(hostname -f || hostname)}

# ip addr from cmdline, then default route source addr
ip=${3:-$(ip -o route get 255.0 2>/dev/null | sed -e 's/.*src \([^ ]*\) .*/\1/')}

# protocol from cmdline, then https
protocol=${4:-https}

hostname_url="${protocol}://${hostname}:${port}/"
ip_url="${ip:+ or ${protocol}://${ip}:${port}/}"

printf 'Web console: %s%s\n\n' "${hostname_url}" "${ip_url}"  > /run/cockpit/active.motd