From 81ad761c88df4589aa8e465c679147a0d0ed24fe Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Thu, 28 Nov 2019 18:16:51 +0000 Subject: net-p2p/xmr-stak-rx: add net-p2p/xmr-stak-rx --- .../net-p2p/xmr-stak-rx/etc/conf.d/xmr-stak-rx | 9 ++++ .../net-p2p/xmr-stak-rx/etc/init.d/xmr-stak-rx | 63 ++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 factory-default/net-p2p/xmr-stak-rx/etc/conf.d/xmr-stak-rx create mode 100755 factory-default/net-p2p/xmr-stak-rx/etc/init.d/xmr-stak-rx (limited to 'factory-default') 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 $? +} -- cgit v1.2.3