Hallo
Hier die Log Datei warum geht es nicht als zip ?
Kann die Log Datei nicht mit dem Start Datum von ureminder geschrieben werden.
Ich kann erst am Wochenende nochmal Testen.
+ getopts :abd:hlv option
+ case $option in
+ re='^[0-9]+$'
+ [[ 1 =~ ^[0-9]+$ ]]
+ '[' 1 -lt 1 ']'
+ days=1
+ getopts :abd:hlv option
if [[ $adv == "true" ]] || [[ $Adv == "true" ]]; then do=1 && echo $"Display message: What's to do when upgrading - ON"; fi
+ [[ true == \t\r\u\e ]]
+ do=1
+ echo 'Display message: What'\''s to do when upgrading - ON'
Display message: What's to do when upgrading - ON
if [ $Days ]; then days=$Days; fi
+ '[' 7 ']'
+ days=7
if [ $days -eq 1 ]; then echo $"Auto upgrade every day - ON"; fi
+ '[' 7 -eq 1 ']'
if [ $days -gt 1 ]; then echo $"Auto upgrade every $days days - ON"; fi
+ '[' 7 -gt 1 ']'
+ echo 'Auto upgrade every 7 days - ON'
Auto upgrade every 7 days - ON
# error db.lck
if [ $(pgrep pacman) ]; then
send $"Error: Pacman is busy" "Is there another app upgrading your system?" -a ureminder -t 0 -u critical
exit 1
elif [ -f /var/lib/pacman/db.lck ] && [ ! $(pgrep pacman) ]; then
send $"Error: Pacman database locked" "<a href='https://wiki.archlinux.org/title/Pacman#%22Failed_to_init_transaction_(unable_to_lock_database)%22_error'>How to solve the problem</a>" -a ureminder -t 0 -u critical
exit 1
fi
++ pgrep pacman
+ '[' ']'
+ '[' -f /var/lib/pacman/db.lck ']'
# update mirrors
reflector --age 5 --delay 0.25 --protocol https --latest 5 --save /etc/pacman.d/mirrorlist || Error="reflector --age 5 --delay 0.25 --protocol https --latest 5"
+ reflector --age 5 --delay 0.25 --protocol https --latest 5 --save /etc/pacman.d/mirrorlist
# del PKGS from cache which are not installed anymore
paccache -ruk0 || Error="paccache -ruk0"
+ paccache -ruk0
==> no candidate packages found for pruning
# keep current package and last for downgrade purpose
paccache -rk2 || Error="paccache -rk2"
+ paccache -rk2
==> no candidate packages found for pruning
# list all installed packages
pacman -Qqe > /var/pkg.lst || Error="pacman -Qqe"
+ pacman -Qqe
# download new packages
pacman -Syuw --noconfirm || Error="# pacman -Syuw"
+ pacman -Syuw --noconfirm
:: Paketdatenbanken werden synchronisiert …
endeavouros wird heruntergeladen …
core wird heruntergeladen …
extra wird heruntergeladen …
multilib wird heruntergeladen …
:: Vollständige Systemaktualisierung wird gestartet …
Abhängigkeiten werden aufgelöst …
Paket (2) Alte Version Neue Version Netto-Veränderung
extra/abseil-cpp 20240722.0-1 20240722.1-1 0,00 MiB
endeavouros/eos-bash-shared 25.1.8-1 25.1.9-1 0,00 MiB
Gesamtgröße des Downloads: 0,00 MiB
:: Download fortsetzen? [J/n]
Schlüsselbund wird geprüft …
Paketintegrität wird geprüft …
# check for PKGS upgrades available
PKGS=($(pacman -Qu | awk '{print $1}')) || Error="pacman -Qu"
+ PKGS=($(pacman -Qu | awk '{print $1}'))
++ pacman -Qu
++ awk '{print $1}'
Nr=0
+ Nr=0
for PKG in ${PKGS[@]}; do
Nr=$(($Nr+1))
PK+=("$Nr.$PKG")
done
+ for PKG in ${PKGS[@]}
+ Nr=1
+ PK+=("$Nr.$PKG")
+ for PKG in ${PKGS[@]}
+ Nr=2
+ PK+=("$Nr.$PKG")
# KERNEL upgrade
KERNEL=$(cat /proc/version | awk '{ print $4}'| sed -e 's/(//' -e 's/@.*//')
++ cat /proc/version
++ awk '{ print $4}'
++ sed -e 's/(//' -e 's/@.*//'
+ KERNEL=linux
for i in ${PKGS[*]}; do
if [[ $KERNEL == $i ]]; then
RKERNEL=$i
fi
done
+ for i in ${PKGS[*]}
+ [[ linux == abseil-cpp ]]
+ for i in ${PKGS[*]}
+ [[ linux == eos-bash-shared ]]
# GUI upgrade
for j in ${GUIs[@]}; do
if [ $(pgrep -fc $j) -gt "0" ]; then
for l in ${PKGS[@]}; do
if [[ $l == $j ]]; then
GUI=$j
fi
done
fi
done
+ for j in ${GUIs[@]}
++ pgrep -fc awesome
+ '[' 0 -gt 0 ']'
+ for j in ${GUIs[@]}
++ pgrep -fc budgie-session
+ '[' 0 -gt 0 ']'
+ for j in ${GUIs[@]}
++ pgrep -fc cinnamon-desktop
+ '[' 0 -gt 0 ']'
+ for j in ${GUIs[@]}
++ pgrep -fc deepin-daemon
+ '[' 0 -gt 0 ']'
+ for j in ${GUIs[@]}
++ pgrep -fc gnome-shell
+ '[' 0 -gt 0 ']'
+ for j in ${GUIs[@]}
++ pgrep -fc hyprland
+ '[' 0 -gt 0 ']'
+ for j in ${GUIs[@]}
++ pgrep -fc i3
+ '[' 0 -gt 0 ']'
+ for j in ${GUIs[@]}
++ pgrep -fc lxsession
+ '[' 0 -gt 0 ']'
+ for j in ${GUIs[@]}
++ pgrep -fc lxqt-session
+ '[' 0 -gt 0 ']'
+ for j in ${GUIs[@]}
++ pgrep -fc mate-desktop
+ '[' 0 -gt 0 ']'
+ for j in ${GUIs[@]}
++ pgrep -fc plasma-desktop
+ '[' 0 -gt 0 ']'
+ for j in ${GUIs[@]}
++ pgrep -fc sway
+ '[' 0 -gt 0 ']'
+ for j in ${GUIs[@]}
++ pgrep -fc xfce4-session
+ '[' 0 -gt 0 ']'
# Witch of in config file noted applicatins get's a package upgrade
for m in ${PKGS[*]}; do
for n in ${APPS[*]};do
if [[ "$m" == "$n" ]]; then
UAPPS+=($n)
fi
done
done
+ for m in ${PKGS[*]}
+ for n in ${APPS[*]}
+ [[ abseil-cpp == \f\i\r\e\f\o\x ]]
+ for n in ${APPS[*]}
+ [[ abseil-cpp == \l\i\b\r\e\w\o\l\f ]]
+ for n in ${APPS[*]}
+ [[ abseil-cpp == \k\a\t\e ]]
+ for n in ${APPS[*]}
+ [[ abseil-cpp == \v\i\m ]]
+ for n in ${APPS[*]}
+ [[ abseil-cpp == \l\i\b\r\e\o\f\f\i\c\e\-\s\t\i\l\l ]]
+ for n in ${APPS[*]}
+ [[ abseil-cpp == \l\i\b\r\e\o\f\f\i\c\e\-\f\r\e\s\h ]]
+ for n in ${APPS[*]}
+ [[ abseil-cpp == \g\i\m\p ]]
+ for n in ${APPS[*]}
+ [[ abseil-cpp == \i\n\k\s\c\a\p\e ]]
+ for n in ${APPS[*]}
+ [[ abseil-cpp == \k\d\e\n\l\i\v\e ]]
+ for n in ${APPS[*]}
+ [[ abseil-cpp == \r\e\t\e\x\t ]]
+ for m in ${PKGS[*]}
+ for n in ${APPS[*]}
+ [[ eos-bash-shared == \f\i\r\e\f\o\x ]]
+ for n in ${APPS[*]}
+ [[ eos-bash-shared == \l\i\b\r\e\w\o\l\f ]]
+ for n in ${APPS[*]}
+ [[ eos-bash-shared == \k\a\t\e ]]
+ for n in ${APPS[*]}
+ [[ eos-bash-shared == \v\i\m ]]
+ for n in ${APPS[*]}
+ [[ eos-bash-shared == \l\i\b\r\e\o\f\f\i\c\e\-\s\t\i\l\l ]]
+ for n in ${APPS[*]}
+ [[ eos-bash-shared == \l\i\b\r\e\o\f\f\i\c\e\-\f\r\e\s\h ]]
+ for n in ${APPS[*]}
+ [[ eos-bash-shared == \g\i\m\p ]]
+ for n in ${APPS[*]}
+ [[ eos-bash-shared == \i\n\k\s\c\a\p\e ]]
+ for n in ${APPS[*]}
+ [[ eos-bash-shared == \k\d\e\n\l\i\v\e ]]
+ for n in ${APPS[*]}
+ [[ eos-bash-shared == \r\e\t\e\x\t ]]
# Exchange libreoffice pkg-name with app-name
if [[ "${UAPPS[@]/libreoffice-still/}" != "${UAPPS[@]}" ]]; then
UAPPS=("${UAPPS[@]/libreoffice-still}")
UAPPS+=("libreoffice")
elif [[ "${UAPPS[@]/libreoffice-fresh/}" != "${UAPPS[@]}" ]]; then
UAPPS=("${UAPPS[@]/libreoffice-fresh}")
UAPPS+=("libreoffice")
fi
+ [[ '' != '' ]]
+ [[ '' != '' ]]
# Witch of U-Application is running
for k in ${UAPPS[@]}; do
if [ $(pgrep -fc $k) -eq "0" ]; then
RUAPPS=("${UAPPS[@]/$k}")
fi
done
# Exchange app-name with pkg-name
#if [[ "${APPS[@]/libreoffice/}" != "${APPS[@]}" ]]; then
# APPS=("${APPS[@]/libreoffice}")
# APPS+=("libreoffice-fresh")
# APPS+=("libreoffice-still")
#fi
for m in ${PKGS[*]}; do
for n in ${StopUpgd[*]};do
if [[ "$m" == "$n" ]]; then
UStopUpgd+=($n)
fi
done
done
+ for m in ${PKGS[*]}
+ for n in ${StopUpgd[*]}
+ [[ abseil-cpp == \a\p\a\c\h\e ]]
+ for n in ${StopUpgd[*]}
+ [[ abseil-cpp == \p\h\p ]]
+ for n in ${StopUpgd[*]}
+ [[ abseil-cpp == \o\p\e\n\s\s\h ]]
+ for n in ${StopUpgd[*]}
+ [[ abseil-cpp == \g\n\o\m\e\-\s\h\e\l\l ]]
+ for m in ${PKGS[*]}
+ for n in ${StopUpgd[*]}
+ [[ eos-bash-shared == \a\p\a\c\h\e ]]
+ for n in ${StopUpgd[*]}
+ [[ eos-bash-shared == \p\h\p ]]
+ for n in ${StopUpgd[*]}
+ [[ eos-bash-shared == \o\p\e\n\s\s\h ]]
+ for n in ${StopUpgd[*]}
+ [[ eos-bash-shared == \g\n\o\m\e\-\s\h\e\l\l ]]
# Days, hours and minutes till next auto upgrade
NOW=$(date --date='now' +%s)
++ date --date=now +%s
+ NOW=1737899776
LPUU=$(date -d $(awk '/upgraded/ { print $1 }' /var/log/pacman.log | tail -1 | sed -e 's/\[//' -e 's/\]//') +%s)
+++ awk '/upgraded/ { print $1 }' /var/log/pacman.log
+++ tail -1
+++ sed -e 's/\[//' -e 's/\]//'
++ date -d 2025-01-25T18:13:19+0100 +%s
+ LPUU=1737825199
LPU=$((NOW-LPUU))
+ LPU=74577
NPU=$((days*86400-LPU))
+ NPU=530223
TIMER=( $(journalctl -u ureminder.service -g Started -o short-unix | tail -2 | awk '{print substr($1, 1, length($1) -7)}') )
+ TIMER=($(journalctl -u ureminder.service -g Started -o short-unix | tail -2 | awk '{print substr($1, 1, length($1) -7)}'))
++ journalctl -u ureminder.service -g Started -o short-unix
++ tail -2
++ awk '{print substr($1, 1, length($1) -7)}'
#if [ $((TIMER + NPU)) -gt $NOW ]; then TIMER=
PERIOD=$((${TIMER[1]}-${TIMER[0]}))
+ PERIOD=-1737898907
COUNT=$((NPU/PERIOD))
+ COUNT=0
CREST=$((NPU%PERIOD))
+ CREST=530223
NTU=$((COUNT*PERIOD))
+ NTU=0
if [ $CREST -eq 0 ]; then
NU=$NPU
else
NU=$(($NPU+PERIOD))
fi
+ '[' 530223 -eq 0 ']'
+ NU=-1737368684
DAYS=$((NU/86400))
+ DAYS=-20108
DREST=$((NU%86400))
+ DREST=-37484
HOURS=$((DREST/3600))
+ HOURS=-10
HREST=$((DREST%3600))
+ HREST=-1484
MINUTES=$((HREST/60))
+ MINUTES=-24
# Messages
if [ ${#PKGS[*]} -eq 1 ]; then
PKMESS=$"One new package: ${PK[*]}"
elif [ ${#PKGS[*]} -ge 2 ]; then
PKMESS=$"${#PKGS[*]} new packages: ${PK[*]}"
fi
+ '[' 2 -eq 1 ']'
+ '[' 2 -ge 2 ']'
+ PKMESS='2 neue Pakete: 1.abseil-cpp 2.eos-bash-shared'
if [ ${#RUAPPS[@]} -ge 1 ]; then
SAVE=$"Save ${RUAPPS[@]} documents!\n"
fi
+ '[' 0 -ge 1 ']'
SYU=$"Run '# pacman -Syu' on terminal!\n"
+ SYU='Führe ein '\''# pacman -Syu'\'' im Terminal aus!\n'
if [ $NU -ge 86400 ]; then NextUg=$"Next auto upgrade in $DAYS days\n"
elif [ $NU -ge 3600 ]; then NextUg=$"Next auto upgrade in $HOURS hours\n"
else NextUg=$"Next auto upgrade in $MINUTES minutes\n"
fi
+ '[' -1737368684 -ge 86400 ']'
+ '[' -1737368684 -ge 3600 ']'
+ NextUg='Auto-Upgrade in -24 Minuten\n'
if [[ "$RKERNEL" != "" ]] && [[ $GUI != "" ]]; then
MESS=$"GUI and kernel upgrade:"
DO=$"Restart your system"
elif [[ "$RKERNEL" != "" ]]; then
MESS=$"$RKERNEL upgrade:"
DO=$"Restart your system"
elif [[ $GUI != "" ]]; then
MESS=$"$GUI upgrade:"
DO=$"Restart your usersesson!\n"
elif [ ${#UAPPS[*]} -gt "0" ]; then
MESS=$"Application upgrade:"
DO=$"Restart ${UAPPS[*]}!\n"
else
MESS=$"Upgrade successfull:"
DO=$"Nothing else to do!\n"
fi
+ [[ '' != '' ]]
+ [[ '' != '' ]]
+ [[ '' != '' ]]
+ '[' 0 -gt 0 ']'
+ MESS='Upgrade durchgeführt:'
+ DO='Nothing else to do!\n'
if [ ${#UStopUpgd[@]} -ge 1 ]; then
days=""
send $"New version ${UStopUpgd[@]} arrived" $"$SYU$PKMESS" -a ureminder -t 0 -u critical
exit 1
fi
+ '[' 0 -ge 1 ']'
# Auto upgrade
if [ $days ] && [ "$(((LPU)/days))" -ge "86400" ] && [ "${#PKGS[*]}" -gt "0" ]; then
NID=$(send $"Upgrade starts in 1 minute:" $"$SAVE" -a ureminder -t 0 -u normal -p)
sleep 60
NID=$(send $"Upgrading:" $"Keep system running!" -a ureminder -t 0 -u critical -r $NID -p)
pacman -Syu --noconfirm || Error="# pacman -Syu"
send "$MESS" "$DO" -a ureminder -t 0 -u normal
elif [ "${#PKGS[*]}" -gt "0" ]; then
if [ $do ] && [ $days ]; then send "$PKMESS" "$SAVE$SYU$DO$NextUg" -a ureminder -t 0 -u normal
elif [ $days ]; then send "$PKMESS" "$NextUg" -a ureminder -t 0 -u normal
elif [ $do ]; then send "$PKMESS" "$SAVE$SYU$DO" -a ureminder -t 0 -u normal
else send "$PKMESS" -a ureminder -t 0 -u normal
fi
fi
+ '[' 7 ']'
+ '[' 10653 -ge 86400 ']'
+ '[' 2 -gt 0 ']'
+ '[' 1 ']'
+ '[' 7 ']'
+ send '2 neue Pakete: 1.abseil-cpp 2.eos-bash-shared' 'Führe ein '\''# pacman -Syu'\'' im Terminal aus!\nNothing else to do!\nAuto-Upgrade in -24 Minuten\n' -a ureminder -t 0 -u normal
++ who -T
++ awk '/+/{print $1}'
++ head -1
+ TUSER=ralf
++ id -u ralf
+ sudo -u ralf DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus notify-send '2 neue Pakete: 1.abseil-cpp 2.eos-bash-shared' 'Führe ein '\''# pacman -Syu'\'' im Terminal aus!\nNothing else to do!\nAuto-Upgrade in -24 Minuten\n' -a ureminder -t 0 -u normal
# error message
if [ "$Error" != "" ]; then
send $"Error: $Error" $"To analyse run this command on terminal!" -a ureminder -t 0 -u critical
fi
+ '[' '' '!=' '' ']'