Eliminar 'scripts/check_updates.sh'

This commit is contained in:
#root_sti 2022-08-23 01:49:42 +00:00
parent 6ed46352b3
commit ff84d76b3c

View file

@ -1,32 +0,0 @@
#!/bin/bash
HISTORY=(`tail -n 1 /var/log/apt/history.log | awk '{print $2}' | tr -d '-'`)
DATE=(`date +%Y%m%d`)
CHECKFILE=(`ls /tmp | grep check_update`)
UPDATES=(`apt list --upgradable | grep -v Listando | wc -l`)
## diference ##
dif() {
echo "$DATE-$HISTORY" | bc
}
## check for updates ##
check_updates() {
if [ "$UPDATES" != "0" ]; then
echo "$UPDATES" > /tmp/check_updates
else
exit 0
fi
}
## run the script ##
if [ "$(dif)" != "0" ]; then
$(check_updates)
else
exit 0
fi