forked from axiom-team/astroport
su $YOU
This commit is contained in:
parent
a77c58543d
commit
e1df300d92
|
@ -9,9 +9,11 @@ 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) == "root" ]]; then
|
||||
export IPFSNODEID=$(su $YOU -c "ipfs id -f='<id>\n'")
|
||||
chown -R $YOU /tmp/zen/
|
||||
chown $YOU /tmp/g1sms.log
|
||||
su $YOU
|
||||
cd $MY_PATH
|
||||
export IPFSNODEID=$(ipfs id -f='<id>\n')
|
||||
#chown -R $YOU /tmp/zen/
|
||||
#chown $YOU /tmp/g1sms.log
|
||||
else
|
||||
export IPFSNODEID=$(ipfs id -f='<id>\n')
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue