__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
#!/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"
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| apt-cdrom-check | File | 2.39 KB | 0755 |
|
| apt-check | File | 18.35 KB | 0755 |
|
| apt_check.py | File | 18.35 KB | 0755 |
|
| backend_helper.py | File | 4.92 KB | 0755 |
|
| cddistupgrader | File | 619 B | 0755 |
|
| distro-cd-updater | File | 14.46 KB | 0755 |
|
| list-oem-metapackages | File | 1.3 KB | 0755 |
|
| livepatch-notification | File | 18.38 KB | 0755 |
|
| package-data-downloader | File | 11.83 KB | 0755 |
|
| package-system-locked | File | 358 B | 0755 |
|
| system-crash-notification | File | 14.38 KB | 0755 |
|
| ubuntu-advantage-notification | File | 14.38 KB | 0755 |
|
| update-motd-fsck-at-reboot | File | 2.81 KB | 0755 |
|
| update-motd-hwe-eol | File | 1.81 KB | 0755 |
|
| update-motd-reboot-required | File | 115 B | 0755 |
|
| update-motd-updates-available | File | 1.69 KB | 0755 |
|
| update-notifier-crash | File | 513 B | 0755 |
|