root or $YOU
This commit is contained in:
parent
0b47e88c86
commit
7f905a45c9
|
@ -222,7 +222,7 @@ do
|
||||||
silkajExitCode=$?
|
silkajExitCode=$?
|
||||||
|
|
||||||
((i++))
|
((i++))
|
||||||
[ $i -gt 6 ] && continue
|
[ $i -gt 4 ] && continue
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ $silkajOutput =~ $silkajQuantitativeAmountPattern ]]
|
if [[ $silkajOutput =~ $silkajQuantitativeAmountPattern ]]
|
||||||
|
|
|
@ -10,9 +10,14 @@ 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);
|
||||||
[[ $USER == $YOU ]] && IPFSNODEID=$(ipfs id -f='<id>\n') \
|
if [[ $USER == $YOU ]]; then
|
||||||
|| IPFSNODEID=$(su $YOU -c "ipfs id -f='<id>\n'") # CASE root
|
IPFSNODEID=$(ipfs id -f='<id>\n') \
|
||||||
|
else
|
||||||
|
# CASE root
|
||||||
|
IPFSNODEID=$(su $YOU -c "ipfs id -f='<id>\n'")
|
||||||
|
chown -R $YOU /tmp/zen/
|
||||||
|
chown $YOU /tmp/g1sms.log
|
||||||
|
fi
|
||||||
|
|
||||||
NANODATE=$(date -u +%s%N) #1569692075385428020
|
NANODATE=$(date -u +%s%N) #1569692075385428020
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue