Skip to content

Commit

Permalink
🎨 Migrate add-on to new Home Assistant configuration mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
casse-boubou committed May 26, 2024
1 parent 590332a commit 4275d8b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions p2pool/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ ports_description:
3333/tcp: Port open for mining witht external xmrig
37889/tcp: P2Pool p2p port
37888/tcp: P2Pool mini p2p port
map:
- addon_config:rw
options:
p2pool_conf_overrides:
- property: no-cache
Expand Down
6 changes: 5 additions & 1 deletion p2pool/rootfs/etc/s6-overlay/s6-rc.d/p2pool/run
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ conf_props+=(--loglevel $loglevel)
bashio::log.info "P2pool log level set to $loglevel"


# Create folder for data
mkdir -p \
/config/data_api

# Launching p2pool
bashio::log.info "Starting of P2Pool"
exec /opt/p2pool --data-api /tmp --local-api "${conf_props[@]}"
exec /opt/p2pool --data-api /config/data_api --local-api "${conf_props[@]}"
2 changes: 1 addition & 1 deletion p2pool/rootfs/etc/s6-overlay/s6-rc.d/status_commande/run
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ done


# --- Wait for p2pool sync ---
while (($(jq '.pool.hashrate' /tmp/stats_mod) < 2000000)); do
while (($(jq '.pool.hashrate' /config/data_api/stats_mod) < 2000000)); do
bashio::log.error "Wait for p2pool sync"
sleep 5
done
Expand Down

0 comments on commit 4275d8b

Please sign in to comment.