Simple reminder for checking updates. The script can link to the $HOME/.desktop-session/startup file.
An example:
echo "./simple-update-reminder" >> $HOME/.desktop-session/startup
Correct path to startup file if the script is not $HOME directory.
For example if in directory $HOME/.config
echo "cd $HOME/.config && ./simple-update-reminder" >> $HOME/.desktop-session/startup
Code:
#!/bin/bash
# RJP 8.3.2025 simple update reminder for antiX
# 9.3.2025 For more accurance time must change as seconds
# the script can link to the $HOME/.desktop-session/startup file
# An example: echo "./simple-update-reminder" >> $HOME/.desktop-session/startup
# For example if in directory $HOME/.config
# echo "cd $HOME/.config && ./simple-update-reminder" >> $HOME/.desktop-session/startup
# Correct path to startup file if the script is not $HOME directory
# inspired from PPC´s apt reminder
# https://www.antixforum.com/forums/reply/107572/
# PPC´s check if a network connection is available (by checking if Google is online), if no network is detected, exit
if ! nc -zw1 google.com 443; then exit; fi
#
date --date="$(stat -c %y /var/lib/apt/periodic/update-success-stamp| cut -d" " -f1)" +%s --utc > /tmp/lastupdate0
#
date --date="$(date +%F)" +%s --utc > /tmp/today
# last update + 7 days in seconds is 604800 (60 x 60 x 24 x 7)
awk "BEGIN {print ($(cat /tmp/lastupdate0) + 19789)}" > /tmp/lastupdate
if [[ $(cat /tmp/lastupdate) -lt $(cat /tmp/today) ]]
then
yad --width=400 --text-align=center --center --title=$"You should check updates:" --text="
You have not updated your antiX for 7 days or more
Run antiX Updater "
else
exit 0
fi
Advanced version.
simple-update-reminder-advanced.zip
Code:
#!/bin/bash
# RJP 8.3.2025 simple update reminder for antiX
# 9.3.2025 For more accurance time must change as seconds
# the script can link to the $HOME/.desktop-session/startup file
# An example: echo "./simple-update-reminder" >> $HOME/.desktop-session/startup
# For example if in directory $HOME/.config
# echo "cd $HOME/.config && ./simple-update-reminder" >> $HOME/.desktop-session/startup
# Correct path to startup file if the script is not $HOME directory
# inspired from PPC´s apt reminder
# https://www.antixforum.com/forums/reply/107572/
# PPC´s check if a network connection is available (by checking if Google is online), if no network is detected, exit
if ! nc -zw1 google.com 443; then exit; fi
#
date --date="$(stat -c %y /var/lib/apt/periodic/update-success-stamp| cut -d" " -f1)" +%s --utc > /tmp/lastupdate0
#
date --date="$(date +%F)" +%s --utc > /tmp/today
# last update + 7 days in seconds is 604800 (60 x 60 x 24 x 7)
awk "BEGIN {print ($(cat /tmp/lastupdate0) + 604800)}" > /tmp/lastupdate
awk "BEGIN {print ($(cat /tmp/today) - $(cat /tmp/lastupdate0))}" > /tmp/erotus
awk "BEGIN {print ($(cat /tmp/erotus) / 86400)}" > /tmp/lastday0
awk -v FS='.' '{print $1}' /tmp/lastday0 > /tmp/lastday
if [[ $(cat /tmp/lastupdate) -lt $(cat /tmp/today) ]]
then
yad --width=400 --text-align=center --center --title=$"You should check updates:" --text="
You have not updated your antiX for $(cat /tmp/lastday) days
Run antiX Updater "
else
exit 0
fi
################################################
Edit 11.3.2025
Simple update reminder checks when you have ran antiX update last time. You can check that time via Terminal also.
stat -c %y /var/lib/apt/periodic/update-success-stamp| cut -d" " -f1
If you have not ran update within three (3) days, notifier launch automatically.
You can also launch simple-update-remider-gui via menu or Terminal.