Skip to content

Commit

Permalink
Mine on the p2pool node too
Browse files Browse the repository at this point in the history
  • Loading branch information
gbenson committed Nov 10, 2023
1 parent 89ca19e commit c397023
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
9 changes: 5 additions & 4 deletions setup-miner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ hash=ff6e67d725ee64b4607dc6490a706dc9234c708cff814477de52d3beb781c6a1

if [ -d /opt/xmrig ]; then
SKIP_SETUP=yes
else
fi
if [ -z "$SKIP_SETUP" ]; then
for snap in lxd core20 snapd; do
snap remove $snap
done
Expand All @@ -23,12 +24,12 @@ else

apt-get autoremove -y --purge modemmanager

#apt-get update
#apt-get upgrade -y
#apt-get dist-upgrade -y
apt-get update
apt-get upgrade -y
fi

mkdir -p /opt/xmrig/bin && cd /opt/xmrig
[ -e $tarball ] && exit 1
curl -Lo $tarball $download/v$version/$tarball
echo $hash $tarball > $tarball.SHA256SUM
sha256sum -c $tarball.SHA256SUM
Expand Down
9 changes: 7 additions & 2 deletions setup-p2pool-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ EOF

apt-get update
apt-get upgrade -y
apt-get dist-upgrade -y
apt-get install -y docker-ce docker-compose-plugin

for sn in monerod p2pool; do
Expand Down Expand Up @@ -114,8 +113,14 @@ RestartSec=30s
WantedBy=multi-user.target
EOF

SKIP_SETUP=1 bash /opt/monero-node/setup-miner.sh
sed -i \
-e 's/network\.target/p2pool.service\nRequires=p2pool.service/' \
-e 's/p2pool\.gbenson\.net/127.0.0.1/g' \
/lib/systemd/system/xmrig.service

systemctl daemon-reload
systemctl enable p2pool
systemctl enable p2pool xmrig

# Adding users isn't necessary except to avoid numeric UIDs in top
addgroup --system --gid 801 monerod
Expand Down

0 comments on commit c397023

Please sign in to comment.