Guest User

Corrected

a guest
Aug 19th, 2018
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2.  
  3. # https://bitcointalk.org/index.php?topic=2799605.msg
  4.  
  5. # NOTE: You need to set your DNS server address below.
  6. # Don't just hammer Google's servers when your ISP has
  7. # already provided the infrastructure.
  8. DNS=""
  9.  
  10. [ $# -lt 5 ] && {
  11.   echo "Usage: $0 workername1 workername2 workername3 hostname ip"
  12.   exit 1
  13. }
  14.  
  15. mv /config/bmminer.conf /config/bmminer.conf.backup
  16. mv /config/network.conf /config/network.conf.backup
  17.  
  18. cat <<EOF >/config/bmminer.conf
  19. {
  20. "pools" : [ {
  21.   "url" : "stratum.antpool.com:3333",
  22.   "user" : "test.$1",
  23.   "pass" : "123"
  24. },
  25. {
  26.   "url" : "stratum.antpool.com:3333",
  27.   "user" : "test.$2",
  28.   "pass" : "123"
  29. },
  30. {
  31.   "url" : "stratum.antpool.com:3333",
  32.   "user" : "test.$3",
  33.   "pass" : "123"
  34. } ],
  35. "api-listen" : "true",
  36. "api-network" : "true",
  37. "api-groups" : "A:stats:pools:devs:summary:version",
  38. "api-allow" : "A:0/0,W:*",
  39. "bitmain-use-vil" : "true",
  40. "bitmain-freq" : "550",
  41. "bitmain-voltage" : "0706",
  42. "multi-version" : "1"
  43. }
  44. EOF
  45.  
  46. chmod 400 /config/bmminer.conf
  47.  
  48. cat <<EOF > /config/network.conf
  49. hostname=miner$4
  50. ipaddress=10.0.0.$5
  51. netmask=255.255.255.0
  52. gateway=10.0.0.138
  53. dnsservers="$DNS"
  54. EOF
  55.  
  56. chmod 400 /config/network.conf
  57.  
  58. #/etc/init.d/bmminer.sh restart >/dev/null 2>&1
  59. #/etc/init.d/network.sh
  60. #/etc/init.d/avahi restart > /dev/null
  61. #echo "root:antMiner Configuration:23c2a2d78c0d20ec069097d7d20c4392" >> /config/lighttpd-htdigest.user
  62.  
  63. exit 0
Add Comment
Please, Sign In to add comment