diff --git a/hive/bin/ethminer b/hive/bin/ethminer index 041a29d09..d4a51a328 100755 --- a/hive/bin/ethminer +++ b/hive/bin/ethminer @@ -27,18 +27,46 @@ function config_gen() { [[ -z $ETHMINER_OPENCL && $ETHMINER_CUDA == 1 ]] && echo "--cuda" >> $MINER_CONFIG [[ $ETHMINER_OPENCL == 1 && $ETHMINER_CUDA == 1 ]] && echo "--cuda-opencl" >> $MINER_CONFIG - if [[ ! -z $ETHMINER_TEMPLATE ]]; then - echo -n "-O $ETHMINER_TEMPLATE" >> $MINER_CONFIG - [[ ! -z $ETHMINER_PASS ]] && echo -n ":$ETHMINER_PASS" >> $MINER_CONFIG - echo -en "\n" >> $MINER_CONFIG - fi - if [[ ! -z $ETHMINER_SERVER ]]; then - echo -n "-S $ETHMINER_SERVER" >> $MINER_CONFIG - [[ ! -z $ETHMINER_PORT ]] && echo -n ":$ETHMINER_PORT" >> $MINER_CONFIG - echo -en "\n" >> $MINER_CONFIG +#pre 0.14.0rc0 +# if [[ ! -z $ETHMINER_TEMPLATE ]]; then +# echo -n "-O $ETHMINER_TEMPLATE" >> $MINER_CONFIG +# [[ ! -z $ETHMINER_PASS ]] && echo -n ":$ETHMINER_PASS" >> $MINER_CONFIG +# echo -en "\n" >> $MINER_CONFIG +# fi +# +# if [[ ! -z $ETHMINER_SERVER ]]; then +# echo -n "-S $ETHMINER_SERVER" >> $MINER_CONFIG +# [[ ! -z $ETHMINER_PORT ]] && echo -n ":$ETHMINER_PORT" >> $MINER_CONFIG +# echo -en "\n" >> $MINER_CONFIG +# fi + + + if [[ ! -z $ETHMINER_TEMPLATE && ! -z $ETHMINER_SERVER ]]; then + local url= + local protocol= + local server= + grep -q "^stratum.*://" <<< $ETHMINER_SERVER + if [[ $? == 0 ]]; then + protocol=`awk -F '://' '{print $1"://"}' <<< $ETHMINER_SERVER` + server=`awk -F '://' '{print $2}' <<< $ETHMINER_SERVER` + else #no protocol in server + protocol="stratum+tcp://" + server=$ETHMINER_SERVER + fi + url+=$protocol + + url+=$ETHMINER_TEMPLATE + [[ ! -z $ETHMINER_PASS ]] && url+=":$ETHMINER_PASS" + + url+="@$server:$ETHMINER_PORT" + + echo "-P $url" >> $MINER_CONFIG fi + + + [[ ! -z $ETHMINER_USER_CONFIG ]] && echo "$ETHMINER_USER_CONFIG" >> $MINER_CONFIG #replace tpl values in whole file diff --git a/hive/ethminer b/hive/ethminer index 2ba98da80..a73756ced 120000 --- a/hive/ethminer +++ b/hive/ethminer @@ -1 +1 @@ -ethminer014dev4 \ No newline at end of file +ethminer015dev1 \ No newline at end of file diff --git a/hive/ethminer014dev4/ethminer b/hive/ethminer015dev1/ethminer similarity index 69% rename from hive/ethminer014dev4/ethminer rename to hive/ethminer015dev1/ethminer index f2d787208..7576309f2 100755 Binary files a/hive/ethminer014dev4/ethminer and b/hive/ethminer015dev1/ethminer differ diff --git a/hive/ethminer014dev4/ethminer.conf b/hive/ethminer015dev1/ethminer.conf similarity index 100% rename from hive/ethminer014dev4/ethminer.conf rename to hive/ethminer015dev1/ethminer.conf diff --git a/hive/ethminer014dev4/ethminer.sh b/hive/ethminer015dev1/ethminer.sh similarity index 100% rename from hive/ethminer014dev4/ethminer.sh rename to hive/ethminer015dev1/ethminer.sh