This commit is contained in:
qo-op 2020-05-12 01:17:16 +02:00
parent fe807e4f09
commit a806dfc6fb
2 changed files with 2 additions and 1 deletions

View File

@ -7,7 +7,7 @@
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);
export YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1);
[[ $YOU == "" ]] && echo "Please run ipfs daemon" && exit 1
if [[ $(whoami) == "root" ]]; then
export IPFSNODEID=$(su $YOU -c "ipfs id -f='<id>\n'")

View File

@ -10,6 +10,7 @@ MY_PATH="`dirname \"$0\"`" # relative
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
[[ $IPFSNODEID == "" ]] && echo "PROBLEM GETTING IPFSNODEID" && exit 1
[[ $YOU == "" ]] && echo "PROBLEM GETTING YOU" && exit 1
NANODATE=$(date -u +%s%N) #1569692075385428020