UPDATE-NOTIFIER-sysVinit

Edit 1.6.2024: I made a deb package from sysVinit version.

Edit 2.6.2024: New version

Update-Notifier-SysVinit-all-05-and-06-and-base.zip

###########################################

Versio 2 sysVinit

Without crontabs using /etc/rc.local and user startup file (~/.desktop-session/startup)

….. For ~/.desktop-session/startup a line

cd $HOME/.config && ./PHASE2user &

… to edit the file

xdg-open ~/.desktop-session/startup

….. For /etc/rc.local line

sleep 60 && cd /opt/UPDATE && ./update-check

… to edit the file

gksu geany /etc/rc.local

…. Make a /opt/UPDATE folder

sudo mkdir -p /opt/UPDATE

….. Copy files b.txt update-check to /opt/UPDATE

sudo cp b.txt UPDATE update-check /opt/UPDATE

…… Copy PHASE2user $HOME/.config

cp PHASE2user $HOME/.config

—— set permiisions

sudo chown $USER:root /opt/UPDATE/UPDATE

##########################################################

Files:

b.txt

apt list

PHASE2user

#!/bin/bash
# RJP 21.6.2023
# 1.5.2024 file compairing removed
A=$(grep -o 'apt list' /tmp/a.txt)
B=$(grep -o 'apt list' /tmp/b.txt)
sleep 210
##if [ "$A" = "$B" ]
##then
cd /opt/UPDATE && ./UPDATE
##else
##yad --width=400 --text-align=center --button=OK:1 --text="No updades available. Run apt list --upgradable in Terminal if you want to check" --title="NO UPDATES AVAILABLE"
##fi

UPDATE

#!/bin/bash
#
# RJP 16.6.2023
#
#!/bin/bash
LIST=$(apt-get --simulate upgrade)
#
export DISPLAY=:0.0
echo "$LIST" | yad --list --title "Search Results" --width=1000 --height=500 --text "INFORMATION" --column "AVAILABLE UPDATES" --button=gtk-ok:1
yad --text="Would you like to install updates?" --title="UPDATER"
if [ $? = 0 ];
then
x-terminal-emulator -e /bin/bash -c "sudo apt update && sudo apt upgrade && yad --center --borders=5 --width=400 --text-align=center --button=gtk-ok:1 --title='Update Complete' --buttons-layout=center"
else exit 0
fi

update-check

#!/bin/bash
## RJP 26.6.2023
## check updates every 600 minutes
for (( ; ; ))
do
cp /opt/UPDATE/b.txt /tmp
chmod 644 /tmp/b.txt
apt update > /tmp/a.txt
chmod 644 /tmp/a.txt
sleep 36000
done