End of Life check (EOL) in antiX 23

One of the drawbacks of Linux distros is that they do not have any end of support notification. It would be quite simple to add one, and here is a simple script to check if your current version of antiX is supported compared to version 23.

EDIT 27.2.2025: Version where has support time left message.

EOL-checker-deb-package-and-script

Sources for making EOL-Check

https://www.baeldung.com/linux/shell-seconds-format-date

https://endoflife.date/antix

#!/bin/bash
#
# RJP 24.2.2025
# end of life (EOL) check
# version 2 with better check (thanks to sybok)
# version 3 with calculating time
# https://www.baeldung.com/linux/shell-seconds-format-date
# https://www.xconvert.com/unit-converter/months-to-seconds
# https://endoflife.date/antix
# https://wiki.debian.org/DebianReleases
# 25.2.2025 version 4 with compairing bookworm (debian 12) and bullseye (debian 11).
# Works in antiX 23 and older (but not tested on antiX 21 and older, but should work with them also)
# About conversions: one month = 2629800 seconds, one year = 31557600, etc
# UTC time begins 1.1.1970 so it is 1
# 2025 - 1970 = 55 years = 55 x 12 x 2629800 seconds = 1735668000 seconds.
# To check date --date=@1735668000 --utc = 31.12.2024
# 27.2.2025 support time left added to support message
# 28.2.2025 more human readable message from support time
#
touch /tmp/eol.txt
touch /tmp/bullseye
touch /tmp/12.txt
touch /tmp/11.txt
echo "1" > /tmp/bullseye
touch /tmp/bookworm
echo "1" > /tmp/bookworm
# date --date=@1811895642 --utc is ke 2.6.2027
echo "12" > /tmp/12.txt
echo "11" > /tmp/11.txt
#
grep -o 'VERSION="11' /usr/lib/os-release > /tmp/bullseye
sed -i 's/VERSION="//g' /tmp/bullseye
#
grep -o 'VERSION="12' /usr/lib/os-release > /tmp/bookworm
sed -i 's/VERSION="//g' /tmp/bookworm
#
if [[ "$(cat /tmp/bookworm)" -ge "$(cat /tmp/12.txt)" ]]
then
# date --date=@1811895642 --utc is ke 2.6.2027 as bookworm support ends
# https://wiki.debian.org/DebianReleases
echo "1811895642" > /tmp/eol.txt
#
elif [[ "$(cat /tmp/bullseye)" -ge "$(cat /tmp/11.txt)" ]]
then
# date --date=@1785597642 --utc as bullseye support ends
# https://wiki.debian.org/DebianReleases
echo "1785597642" > /tmp/eol.txt
#
else
# date --date=@1 --utc as 1.1.1970
#
echo "1" > /tmp/eol.txt
fi
#
touch /tmp/current.txt
date --date="$(date +%F)" +%s --utc > /tmp/current.txt
#
sleep 0,1
A=$(cat /tmp/current.txt)
B=$(cat /tmp/eol.txt)
a=$(cat /tmp/eol.txt)
b=$(cat /tmp/current.txt)
c= expr $a - $b > /tmp/tulos
#
awk "BEGIN {print $(cat /tmp/tulos)/2629800}" > /tmp/support_month_left0
awk -v FS='.' '{print $1}' /tmp/support_month_left0 > /tmp/support_month_left
#
if [ "$B" -ge "$A" ]
then
## an alternative way is hide the message if supported using exit 0 in the next line
yad --width=700 --text-align=center --center --title=$"Support time message" --text="Your antiX version is supported.

$(cat /tmp/support_month_left) month left until EOL (support ends)

See more info from https://www.antixforum.com/”
else
yad –width=700 –text-align=center –center –title=$”Support time message” –text=”Support time has ended.

Install or update newer release of antiX. See more info from https://www.antixforum.com/”
fi

 

If support time has ended

Test in antiX 23

 

 

Test in antiX 22