From 96b4166e3ca4e51c68a549bb1aad34b6243a8edc Mon Sep 17 00:00:00 2001 From: xf0r3m Date: Sun, 25 May 2025 13:23:41 +0200 Subject: [PATCH] =?utf8?q?Zamiana=20immudex-updates=20w=20zwyk=C5=82e=20na?= =?utf8?q?rz=C4=99dzie.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- immudex-motd2 | 1 - immudex-updates | 28 ++++++++++++++-------------- immudex-updates-wlog | 3 --- immudex-updates.desktop | 6 ------ 4 files changed, 14 insertions(+), 24 deletions(-) delete mode 100755 immudex-updates-wlog delete mode 100644 immudex-updates.desktop diff --git a/immudex-motd2 b/immudex-motd2 index ac5936c..b4b720b 100755 --- a/immudex-motd2 +++ b/immudex-motd2 @@ -45,6 +45,5 @@ fi echo -e " \t$(uptime | grep -o "load.*$" | tr '[a-z]' '[A-Z]')"; echo; echo -e "morketsmerke.org @ 2025 https://github.com/xf0r3m/immudex"; -cat /tmp/immudex-updates.txt; echo; echo "===================================================================="; diff --git a/immudex-updates b/immudex-updates index 9c6c746..42e92eb 100755 --- a/immudex-updates +++ b/immudex-updates @@ -5,21 +5,21 @@ GREEN="\e[32m"; YELLOW="\e[33m"; ENDCOLOR="\e[0m"; -FILE="/tmp/immudex-updates.txt"; +#FILE="/tmp/immudex-updates.txt"; function getVerFromRSSFeed() { URL=$1; echo $(curl $URL 2> /dev/null | grep '' | sed -n '2p' | sed -e 's/<title>//g' -e 's,,,g' | awk '{printf $1}') } -echo "Obtaining updates information:" > $FILE; -echo " |" >> $FILE ; +echo "Obtaining updates information:"; +echo " |"; if [ -x /usr/bin/librewolf ]; then URL="https://codeberg.org/librewolf/source/releases.rss"; newLibrewolfVer=$(getVerFromRSSFeed $URL); currentLibrewolfVer=$(apt list --installed 2>/dev/null | grep 'librewolf' | awk '{printf $2}'); if ! [ "$currentLibrewolfVer" = "$newLibrewolfVer" ]; then - echo -e " \`- New Librewolf version (${GREEN}${newLibrewolfVer}${ENDCOLOR}) is available." >> $FILE; - echo " |" >> $FILE; + echo -e " \`- New Librewolf version (${GREEN}${newLibrewolfVer}${ENDCOLOR}) is available."; + echo " |"; fi fi @@ -28,8 +28,8 @@ if [ -x /usr/local/bin/ncspot ]; then newNcspotVer=$(getVerFromRSSFeed $URL); currentNcspotVer=$(ncspot -V | awk '{printf $2}'); if ! [ "$currentNcspotVer" = "$newNcspotVer" ]; then - echo -e " \`- New ncspot version (${GREEN}${newNcspotVer}${ENDCOLOR}) is available." >> $FILE; - echo " |" >> $FILE; + echo -e " \`- New ncspot version (${GREEN}${newNcspotVer}${ENDCOLOR}) is available."; + echo " |"; fi fi @@ -38,8 +38,8 @@ if [ -x /usr/local/bin/nu ]; then newNushellVer=$(getVerFromRSSFeed $URL); currentNushellVer=$(nu -v | awk '{printf $1}'); if ! [ "$currentNushellVer" = "$NewNushellVer" ]; then - echo -e " \`- New nushell version (${GREEN}${newNushellVer}${ENDCOLOR}) is available." >> $FILE; - echo " |" >> $FILE; + echo -e " \`- New nushell version (${GREEN}${newNushellVer}${ENDCOLOR}) is available."; + echo " |"; fi fi @@ -48,8 +48,8 @@ if [ -x /usr/local/bin/nextcloud ]; then URL="https://github.com/nextcloud-releases/desktop/releases.atom"; newNextcloudVersion=$(curl $URL 2> /dev/null | grep -o '.*' | grep -v 'rc' | sed -n '2p' | sed -e 's,,,' -e 's,,,' | awk '{printf $2}'); if ! [ "$currentNextcloudVersion" = "$newNextcloudVersion" ]; then - echo -e " \`- New Nextcloud version (${GREEN}${newNextcloudVersion}${ENDCOLOR}) is available." >> $FILE; - echo " |" >> $FILE; + echo -e " \`- New Nextcloud version (${GREEN}${newNextcloudVersion}${ENDCOLOR}) is available."; + echo " |"; fi fi @@ -57,8 +57,8 @@ debianVersion=$(cut -d "." -f 1 /etc/debian_version); URL="https://micronews.debian.org/feeds/feed.rss"; newDebianVersion=$(curl $URL 2>/dev/null | grep -o "Updated Debian ${debianVersion}: ${debianVersion}.[0-9]*" | sed -n '1p' | awk '{printf $4}'); if ! [ "$newDebianVersion" = "$(cat /etc/debian_version)" ]; then - echo -e " \`- New Debian version (${YELLOW}${newDebianVersion}${ENDCOLOR})." >> $FILE; - echo " |" >> $FILE; + echo -e " \`- New Debian version (${YELLOW}${newDebianVersion}${ENDCOLOR})."; + echo " |"; fi apt update > /dev/null 2>&1; @@ -70,4 +70,4 @@ elif [ $packagesToUpdate -lt 50 ]; then color=${YELLOW}; else color=${RED}; fi -echo -e " \`- ${color}${packagesToUpdate}${ENDCOLOR} packages ready to update." >> $FILE; +echo -e " \`- ${color}${packagesToUpdate}${ENDCOLOR} packages ready to update."; diff --git a/immudex-updates-wlog b/immudex-updates-wlog deleted file mode 100755 index 8ab6d78..0000000 --- a/immudex-updates-wlog +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -bash -x /usr/local/sbin/immudex-updates > /tmp/immudex-updates.log 2>&1; diff --git a/immudex-updates.desktop b/immudex-updates.desktop deleted file mode 100644 index e88ca0b..0000000 --- a/immudex-updates.desktop +++ /dev/null @@ -1,6 +0,0 @@ -[Desktop Entry] -Type=Application -Name=immudex-updates -Exec=/usr/local/sbin/immudex-updates-wlog -StartupNotify=false -Terminal=false -- 2.39.5