diff options
-rw-r--r-- | factory-default/net-p2p/xmr-stak/etc/conf.d/xmr-stak | 8 | ||||
-rwxr-xr-x | factory-default/net-p2p/xmr-stak/etc/init.d/xmr-stak | 50 |
2 files changed, 58 insertions, 0 deletions
diff --git a/factory-default/net-p2p/xmr-stak/etc/conf.d/xmr-stak b/factory-default/net-p2p/xmr-stak/etc/conf.d/xmr-stak new file mode 100644 index 00000000..755493ac --- /dev/null +++ b/factory-default/net-p2p/xmr-stak/etc/conf.d/xmr-stak @@ -0,0 +1,8 @@ +# Pool url and port +XMR_STAK_POOL_URL="xmrpool.eu:3333" + +# 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/etc/init.d/xmr-stak b/factory-default/net-p2p/xmr-stak/etc/init.d/xmr-stak new file mode 100755 index 00000000..d9ef64ea --- /dev/null +++ b/factory-default/net-p2p/xmr-stak/etc/init.d/xmr-stak @@ -0,0 +1,50 @@ +#!/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_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_USER:=44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A} +: ${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 + + ebegin "Starting ${RC_SVCNAME}" + /usr/bin/tmux -L "${RC_SVCNAME}" \ + new-session -d /usr/bin/xmr-stak \ + --currency "${XMR_STAK_CURRENCY}" \ + --config "${XMR_STAK_CONFIG}" \ + --cpu "${XMR_STAK_CONFIG_CPU}" \ + --amd "${XMR_STAK_CONFIG_AMD}" \ + --url "${XMR_STAK_POOL_URL}" \ + --user "${XMR_STAK_POOL_USER}" \ + --pass "${XMR_STAK_POOL_PASS}" + eend $? +} + +stop() { + ebegin "Stopping ${RC_SVCNAME}" + /usr/bin/tmux -L "${RC_SVCNAME}" \ + kill-session + eend $? +} |