Update redis.sh

This commit is contained in:
Mike Reeves
2020-11-11 11:22:52 -05:00
committed by GitHub
parent cb46c13054
commit d3f65ac1a8

View File

@@ -1,5 +1,14 @@
#!/bin/bash
APP=redis
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
UNPARSED=$(redis-cli llen logstash:unparsed | awk '{print $1}')
PARSED=$(redis-cli llen logstash:parsed | awk '{print $1}')