Update
This commit is contained in:
@@ -15,8 +15,8 @@ NC_CMD="nc" # netcat
|
||||
DOCKER="docker"
|
||||
|
||||
# Ensure only one instance of this script is running
|
||||
if pgrep -f $SCRIPTNAME 1>/dev/null; then
|
||||
echo "Killing running instance of $SCRIPTNAME..."
|
||||
if [ "$(pgrep -f $SCRIPTNAME)" != $$ ]; then
|
||||
echo "Killing running instance of $SCRIPTNAME..."
|
||||
pgrep -f -- "$SCRIPTNAME" | grep -vw "$$" | xargs -r kill -KILL
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user