Kayuii / hpool-miner

chia chia-miner hpool hpool-miner hpool-og-miner hpool-pp-miner Synology RaspberryPi
Apache License 2.0
25 stars 12 forks source link

`sed` failure #4

Closed Fmstrat closed 3 years ago

Fmstrat commented 3 years ago

This no longer works (from README):

version: "3"

services:
  miner:
    image: kayuii/hpool-miner:v1.4.1-1
    restart: always
    volumes:
      - /mnt/dst:/mnt/dst
      - /opt/chia/logs:/opt/log
      - /opt/chia/config.yaml:/opt/config.yaml
    command:
      - hpool-chia-miner

The new sed -i fails since config.yaml is mounted outside, it can't "mv/replace" since it can't skirt the filesystem. With set -x in the entrypoint.sh:

+ echo hpool-chia-miner
+ cut -c1
+ [ h = - ]
+ [ hpool-chia-miner = hpool-chia-miner ]
+ [ -n  ]
+ sed -i /path:$/c path: [ '/mnt/dst' ] config.yaml
sed: cannot rename ./sedq0HrNY: Device or resource busy
Fmstrat commented 3 years ago

As a note, I think switching to the ENV variable is a good idea, but you're going to need envs for everything, like minerName for it to be effective. Thanks!

Kayuii commented 3 years ago

I've fixed it