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
|
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);
|
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
|
if [[ $(whoami) == "root" ]]; then
|
||||||
IPFSNODEID=$(ipfs id -f='<id>\n')
|
export IPFSNODEID=$(su $YOU -c "ipfs id -f='<id>\n'")
|
||||||
else
|
|
||||||
# CASE root
|
|
||||||
IPFSNODEID=$(su $YOU -c "ipfs id -f='<id>\n'")
|
|
||||||
chown -R $YOU /tmp/zen/
|
chown -R $YOU /tmp/zen/
|
||||||
chown $YOU /tmp/g1sms.log
|
chown $YOU /tmp/g1sms.log
|
||||||
|
else
|
||||||
|
export IPFSNODEID=$(ipfs id -f='<id>\n')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
NANODATE=$(date -u +%s%N) #1569692075385428020
|
NANODATE=$(date -u +%s%N) #1569692075385428020
|
||||||
|
|
Loading…
Reference in New Issue