Update helixeps.sh

This commit is contained in:
Mike Reeves
2020-11-11 11:16:47 -05:00
committed by GitHub
parent ea1227de9d
commit 711f5ab38f

View File

@@ -1,5 +1,14 @@
#!/bin/bash
APP=helixeps
lf=/tmp/$APP-pidLockFile
# create empty lock file if none exists
cat /dev/null >> $lf
read lastPID < $lf
# if lastPID is not null and a process with that pid exists , exit
[ ! -z "$lastPID" -a -d /proc/$lastPID ] && exit
echo $$ > $lf
PREVCOUNTFILE='/tmp/helixevents.txt'
EVENTCOUNTCURRENT="$(curl -s localhost:9600/_node/stats | jq '.pipelines.helix.events.out')"