From d92c474812f0fdfff2d9393b6c9923a8d091ba2a Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 30 Mar 2021 11:39:51 +0200 Subject: last-backups.in: fix pgrep regex --- last-backups.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/last-backups.in b/last-backups.in index d7b9ec8..ac7f01a 100755 --- a/last-backups.in +++ b/last-backups.in @@ -58,7 +58,7 @@ do [ "${lbu}" == "" ] && lbu="1970_01_01" delta=$[$(date +%s) - $(date -d $(echo ${lbu} | sed "s/_//g") +%s)] namen[${#namen[@]}]="$(basename $(echo ${dest} | sed "s#/\(${recognSubdirRegex}\)\$#_\1#" | sed "s#/rsync\$##; s#/duplicity\$##"))" - if [ -f "/tmp/${backupID}.pid" ] && pgrep -x backup | grep -qxF "$(cat "/tmp/${backupID}.pid")"; then + if [ -f "/tmp/${backupID}.pid" ] && pgrep '(^|/|\s)backup\S*$' | grep -qxF "$(cat "/tmp/${backupID}.pid")"; then laeuft='_laeuft' else laeuft='' -- cgit v1.2.3-70-g09d2