forked from qo-op/bunkerbox
countMErunning
This commit is contained in:
parent
6a0f370f24
commit
82bd9596b8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue