Commit 7e13adb0 authored by ehaupt's avatar ehaupt
Browse files

net-p2p/xmrig: Allow to set additional startup flags via xmrig_flags rc.subr

PR:		253808
Requested by:	Patrick McMunn <doctorwhoguy@gmail.com>
parent 7b84d06a
......@@ -4,6 +4,7 @@
PORTNAME= xmrig
PORTVERSION= 6.9.0
DISTVERSIONPREFIX= v
PORTREVISION= 1
CATEGORIES= net-p2p
MAINTAINER= ehaupt@FreeBSD.org
......
......@@ -16,6 +16,7 @@
# Do not sets it as empty or it will run as root.
# xmrig_conf: The configuration file XMRig uses.
# Default: %%ETCDIR%%/config.json
# xmrig_flags: Additional runtime flags.
. /etc/rc.subr
name="%%PORTNAME%%"
......@@ -25,9 +26,10 @@ load_rc_config ${name}
: ${xmrig_enable:="NO"}
: ${xmrig_user:="%%USERS%%"}
: ${xmrig_conf:="%%ETCDIR%%/config.json"}
: ${xmrig_flags:=""}
command="/usr/sbin/daemon"
procname="%%PREFIX%%/bin/xmrig"
command_args="-f ${procname} --config=${xmrig_conf}"
command_args="-f ${procname} --config=${xmrig_conf} ${xmrig_flags}"
run_rc_command "$1"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment