diff --git a/g1sms/functions.sh b/g1sms/functions.sh index 105481e..54f129a 100755 --- a/g1sms/functions.sh +++ b/g1sms/functions.sh @@ -222,7 +222,7 @@ do silkajExitCode=$? ((i++)) - [ $i -gt 6 ] && continue + [ $i -gt 4 ] && continue done if [[ $silkajOutput =~ $silkajQuantitativeAmountPattern ]] diff --git a/g1sms/init_keys.sh b/g1sms/init_keys.sh index 9ddf487..e11f5c1 100755 --- a/g1sms/init_keys.sh +++ b/g1sms/init_keys.sh @@ -10,9 +10,14 @@ 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); -[[ $USER == $YOU ]] && IPFSNODEID=$(ipfs id -f='\n') \ -|| IPFSNODEID=$(su $YOU -c "ipfs id -f='\n'") # CASE root - +if [[ $USER == $YOU ]]; then + IPFSNODEID=$(ipfs id -f='\n') \ +else + # CASE root + IPFSNODEID=$(su $YOU -c "ipfs id -f='\n'") + chown -R $YOU /tmp/zen/ + chown $YOU /tmp/g1sms.log +fi NANODATE=$(date -u +%s%N) #1569692075385428020