From: Alan J. Pippin Date: Tue, 27 Dec 2022 19:41:29 +0000 (-0700) Subject: Ignore less and tail when checking if we are already running X-Git-Url: http://git.pippins.net/embedvideo/.git/x.gif?a=commitdiff_plain;h=ed94143303c88b1b3af555974e7cb087aeb74c4f;p=zfs-ubuntu%2F.git Ignore less and tail when checking if we are already running Change-Id: I09eb76609f3cbd2529b0561cd8611adc3ab9b5fa --- diff --git a/zfs-replicate-all b/zfs-replicate-all index 01f1bec..c8a8b03 100755 --- a/zfs-replicate-all +++ b/zfs-replicate-all @@ -19,7 +19,7 @@ tmpfile=`tempfile` # Make sure we aren't already running SCRIPT_NAME=${0##*/} PROCESS_LIST=`tempfile` -ps -ef | grep -e "$SCRIPT_NAME" | grep -v grep | grep -v $$ | grep -v $PPID >> $PROCESS_LIST +ps -ef | grep -e "$SCRIPT_NAME" | grep -v grep | grep -v tail | grep -v less | grep -v $$ | grep -v $PPID >> $PROCESS_LIST if [[ $? == 0 ]]; then echo "$date Another $SCRIPT_NAME process is already running" >> $mylogfile cat $PROCESS_LIST >> $mylogfile