diff --git a/crowdbunker.sh b/crowdbunker.sh index c06801d..b8002c4 100755 --- a/crowdbunker.sh +++ b/crowdbunker.sh @@ -13,6 +13,9 @@ mkdir -p ~/.zen/bunkerbox # BunkerBOX temp directory MY_PATH="`dirname \"$0\"`" # relative MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized ME="${0##*/}" +countMErunning=$(ps auxf --sort=+utime | grep -w "$ME" | grep -v -E 'color=auto|grep' | wc -l) +[[ $countMErunning -gt 2 ]] && echo "$ME already running. EXIT." && exit 0 + TS=$(date -u +%s%N | cut -b1-13) [[ ! $(which ipfs) ]] && echo "EXIT. Vous devez avoir installé ipfs CLI sur votre ordinateur" && echo "RDV sur https://dist.ipfs.io/#go-ipfs" && exit 1