403Webshell
Server IP : 172.67.216.182  /  Your IP : 172.70.189.21
Web Server : Apache
System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64
User : www ( 1000)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,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_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/update-notifier/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/update-notifier/update-motd-hwe-eol
#!/bin/sh -e
#
# helper for update-motd


# poor mans force
if [ "$1" = "--force" ]; then
    NEED_EOL_CHECK=yes
else
    if type systemd-detect-virt > /dev/null 2>&1  && systemd-detect-virt -q -c; then
        exit
    fi
    NEED_EOL_CHECK=no
fi

# check time when we did the last update check
stamp="/var/lib/update-notifier/hwe-eol"

# get list dir
StateDir="/var/lib/apt/"
ListDir="lists/"
eval "$(apt-config shell StateDir Dir::State)"
eval "$(apt-config shell ListDir Dir::State::Lists)"

# get dpkg status file
DpkgStatus="/var/lib/dpkg/status"
eval "$(apt-config shell DpkgStatus Dir::State::status)"

# get sources.list file
EtcDir="etc/apt/"
SourceList="sources.list"
eval "$(apt-config shell EtcDir Dir::Etc)"
eval "$(apt-config shell SourceList Dir::Etc::sourcelist)"

# let the actual update be asynchronous to avoid stalling apt-get
cleanup() { rm -f "$tmpfile"; }

# check if we have a list file or sources.list that needs checking
if [ -e "$stamp" ]; then
    if [ "$(find "/$StateDir/$ListDir" "/$EtcDir/$SourceList" "/$DpkgStatus" -type f -newer "$stamp" -print -quit 2> /dev/null)" ]; then
        NEED_EOL_CHECK=yes
    fi
else
    if [ "$(find "/$StateDir/$ListDir" "/$EtcDir/$SourceList" -type f -print -quit 2> /dev/null)" ]; then
        NEED_EOL_CHECK=yes
    fi
fi

# only print status when running this script as a regular user
if [ "$(id -u)" != 0 ] ; then
   [ "$NEED_EOL_CHECK" = "no" ] || /usr/bin/hwe-support-status || true
   exit
fi

tmpfile=""
trap cleanup EXIT
tmpfile=$(mktemp -p $(dirname "$stamp"))

# output something for update-motd
if [ "$NEED_EOL_CHECK" = "yes" ]; then
    {
        # the script may exit with status 10 when a HWE update is needed
        /usr/bin/hwe-support-status || true
    } > "$tmpfile"
    mv "$tmpfile" "$stamp"
fi

# output what we have (either cached or newly generated)
cat "$stamp"

Youez - 2016 - github.com/yon3zu
LinuXploit