summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--factory-default/net-p2p/xmr-stak-rx/etc/conf.d/xmr-stak-rx9
-rwxr-xr-xfactory-default/net-p2p/xmr-stak-rx/etc/init.d/xmr-stak-rx63
-rw-r--r--profiles/common/package.use1
-rw-r--r--profiles/server/package.accept_keywords1
4 files changed, 74 insertions, 0 deletions
diff --git a/factory-default/net-p2p/xmr-stak-rx/etc/conf.d/xmr-stak-rx b/factory-default/net-p2p/xmr-stak-rx/etc/conf.d/xmr-stak-rx
new file mode 100644
index 00000000..cc6d9d7f
--- /dev/null
+++ b/factory-default/net-p2p/xmr-stak-rx/etc/conf.d/xmr-stak-rx
@@ -0,0 +1,9 @@
+# Pool url and port
+XMR_STAK_POOL_URL="xmrpool.eu:3333"
+XMR_STAK_POOL_TLS_URL="xmrpool.eu:9999"
+
+# Pool user name or wallet address
+XMR_STAK_POOL_USER="44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A"
+
+# Pool password, in the most cases x
+XMR_STAK_POOL_PASS="x"
diff --git a/factory-default/net-p2p/xmr-stak-rx/etc/init.d/xmr-stak-rx b/factory-default/net-p2p/xmr-stak-rx/etc/init.d/xmr-stak-rx
new file mode 100755
index 00000000..b20ebd09
--- /dev/null
+++ b/factory-default/net-p2p/xmr-stak-rx/etc/init.d/xmr-stak-rx
@@ -0,0 +1,63 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+: ${pidfile:=/run/${RC_SVCNAME}.pid}
+
+: ${XMR_STAK_CURRENCY:=monero}
+: ${XMR_STAK_CONFIG:=/etc/${RC_SVCNAME}/main.conf}
+: ${XMR_STAK_CONFIG_POOL:=/etc/${RC_SVCNAME}/pools.conf}
+: ${XMR_STAK_CONFIG_CPU:=/etc/${RC_SVCNAME}/cpu.conf}
+: ${XMR_STAK_CONFIG_AMD:=/etc/${RC_SVCNAME}/amd.conf}
+
+# Donate to Monero developers
+: ${XMR_STAK_POOL_URL:=xmrpool.eu:3333}
+: ${XMR_STAK_POOL_TLS_URL:=xmrpool.eu:9999}
+: ${XMR_STAK_POOL_USER:=44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A}
+: ${XMR_STAK_POOL_RIGID:=}
+: ${XMR_STAK_POOL_PASS:=x}
+
+checkconfig() {
+ checkpath --quiet --directory \
+ --owner root --mode 0755 \
+ "/etc/${RC_SVCNAME}"
+}
+
+start() {
+ checkconfig || return 1
+
+ export GPU_FORCE_64BIT_PTR=1
+ export GPU_MAX_HEAP_SIZE=100
+ export GPU_USE_SYNC_OBJECTS=1
+ export GPU_MAX_ALLOC_PERCENT=100
+ export GPU_SINGLE_ALLOC_PERCENT=100
+
+ local _opts
+
+ if [[ -n "${XMR_STAK_POOL_TLS_URL}" ]] ; then
+ _opts+=( --tls-url "${XMR_STAK_POOL_TLS_URL}" )
+ else
+ _opts+=( --url "${XMR_STAK_POOL_URL}" )
+ fi
+
+ ebegin "Starting ${RC_SVCNAME}"
+ /usr/bin/tmux -L "${RC_SVCNAME}" \
+ new-session -d /usr/bin/xmr-stak-rx \
+ --currency "${XMR_STAK_CURRENCY}" \
+ --config "${XMR_STAK_CONFIG}" \
+ --poolconf "${XMR_STAK_CONFIG_POOL}" \
+ --cpu "${XMR_STAK_CONFIG_CPU}" \
+ --amd "${XMR_STAK_CONFIG_AMD}" \
+ --user "${XMR_STAK_POOL_USER}" \
+ --rigid "${XMR_STAK_POOL_RIGID}" \
+ --pass "${XMR_STAK_POOL_PASS}" \
+ ${_opts[@]}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${RC_SVCNAME}"
+ /usr/bin/tmux -L "${RC_SVCNAME}" \
+ kill-session
+ eend $?
+}
diff --git a/profiles/common/package.use b/profiles/common/package.use
index 76b15491..5b2d9d5a 100644
--- a/profiles/common/package.use
+++ b/profiles/common/package.use
@@ -97,6 +97,7 @@ net-misc/connman ethernet -wifi iptables
# 10/02/2017 - beber
net-p2p/xmr-stak hwloc
+net-p2p/xmr-stak-rx hwloc
# 18/03/2018 - beber
sys-process/cronie -anacron
diff --git a/profiles/server/package.accept_keywords b/profiles/server/package.accept_keywords
index b055e2f1..710c2c4d 100644
--- a/profiles/server/package.accept_keywords
+++ b/profiles/server/package.accept_keywords
@@ -42,6 +42,7 @@
# 10/02/2018 - beber
=net-p2p/xmr-stak-2.10.7 ~amd64
+=net-p2p/xmr-stak-rx-1.0.1 ~amd64
# 08/07/2018 - beber
=app-crypt/acme-tiny-4.0.3 ~amd64