forked from axiom-team/astroport
IPFSNODEID
This commit is contained in:
parent
daa89ece9a
commit
6ced07a351
|
@ -10,13 +10,12 @@ MY_PATH="`dirname \"$0\"`" # relative
|
|||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||
|
||||
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1);
|
||||
if [[ $(whoami) == $YOU ]]; then
|
||||
IPFSNODEID=$(ipfs id -f='<id>\n')
|
||||
else
|
||||
# CASE root
|
||||
IPFSNODEID=$(su $YOU -c "ipfs id -f='<id>\n'")
|
||||
if [[ $(whoami) == "root" ]]; then
|
||||
export IPFSNODEID=$(su $YOU -c "ipfs id -f='<id>\n'")
|
||||
chown -R $YOU /tmp/zen/
|
||||
chown $YOU /tmp/g1sms.log
|
||||
else
|
||||
export IPFSNODEID=$(ipfs id -f='<id>\n')
|
||||
fi
|
||||
|
||||
NANODATE=$(date -u +%s%N) #1569692075385428020
|
||||
|
|
Loading…
Reference in New Issue