diff --git a/build/geropkg/attach.sh b/build/geropkg/attach.sh index df1609ab..56be2d99 100755 --- a/build/geropkg/attach.sh +++ b/build/geropkg/attach.sh @@ -5,5 +5,30 @@ DATADIR="${ROOT}/data" if [ ! -z "$1" ]; then DATADIR=$1 fi + +function sysname() { + + SYSTEM=`uname -s` + if [[ "Darwin" == "$SYSTEM" ]] + then + echo "Darwin" + fi + + if [[ "Linux" == "$SYSTEM" ]] + then + name=`cat /etc/system-release|awk '{print $1}'` + echo "Linux $name" + fi +} + +SNAME=`sysname` +if [[ "Darwin" = "$SNAME" ]];then + export DYLD_LIBRARY_PATH=${ROOT}/czero/lib/ + echo $DYLD_LIBRARY_PATH +else + export LD_LIBRARY_PATH=${ROOT}/czero/lib/ + echo $LD_LIBRARY_PATH +fi + ${ROOT}/bin/gero --datadir=${DATADIR} attach diff --git a/build/geropkg/startup.sh b/build/geropkg/startup.sh index e9fe5f17..76ee7330 100755 --- a/build/geropkg/startup.sh +++ b/build/geropkg/startup.sh @@ -47,7 +47,7 @@ if [[ $# -gt 0 ]]; then cmd="$cmd --alpha";shift;; --rpc) localhost=$(hostname -I|awk -F ' ' '{print $1}') - cmd="$cmd --rpc --rpcport $2 --rpcaddr $localhost --rpcapi 'personal,sero,web3' --rpccorsdomain '*'";shift;; + cmd="$cmd --rpc --rpcport $2 --rpcaddr $localhost --rpcapi 'personal,sero,web3' --rpccorsdomain '*'";shift 2;; --port) cmd=${cmd/--port ${DEFAULT_PORT}/--port $2};shift 2;; --keystore)