添加参数
All checks were successful
Build and Release / build-and-test (arm64, alpine) (push) Successful in 13s
Build and Release / build-and-test (amd64, alpine) (push) Successful in 21s
Build and Release / build-and-test (arm64, ubuntu) (push) Successful in 24s
Build and Release / build-and-test (amd64, ubuntu) (push) Successful in 35s
Build and Release / release (push) Has been skipped

This commit is contained in:
2025-12-06 13:59:12 +08:00
parent b220fdc9e9
commit 7baadc74b1
4 changed files with 33 additions and 4 deletions

View File

@@ -31,7 +31,9 @@ DEFAULT_POOL_TLS="false"
DEFAULT_POOL_KEEPALIVE="false"
DEFAULT_POOL_DAEMON="false"
DEFAULT_POOL_SUBMIT_TO_ORIGIN="false"
DEFAULT_POOL_NICEHASH="true"
DEFAULT_ONE_GB_PAGES="false"
DEFAULT_VERBOSE="true"
DEFAULT_CC_ENABLED="false"
DEFAULT_CC_TLS="false"
@@ -117,7 +119,9 @@ replace_config() {
| .pools[0].url = \"$pool_address\"
| .pools[0].user = \"$wallet_address\"
| .pools[0].pass = \"$pool_password\"
| .pools[0].tls = $pool_tls"
| .pools[0].tls = $pool_tls
| .pools[0].nicehash = $pool_nicehash
| .\"verbose\" = $verbose"
[[ "$one_gb_pages" == "true" ]] && jq_cmd+=" | .randomx.\"1gb-pages\" = true"
[[ "$pool_keepalive" == "true" ]] && jq_cmd+=" | .pools[0].keepalive = true"
@@ -200,8 +204,10 @@ show_usage() {
--tls 启用 TLS
--keepalive 启用 KeepAlive
--daemon 启用 SOLO 挖矿
--nicehash 启用 NiceHash 模式 (默认: 启用)
--submit-to-origin 提交到原始矿池
--self-select <地址> 自选矿池地址
--verbose 启用详细输出 (默认: 启用)
--cc 启用 CC
--cc-url <地址> CC 服务器地址
--cc-work-id <ID> CC 工作 ID
@@ -223,11 +229,13 @@ parse_args() {
pool_keepalive=$DEFAULT_POOL_KEEPALIVE
pool_submit_to_origin=$DEFAULT_POOL_SUBMIT_TO_ORIGIN
pool_daemon=$DEFAULT_POOL_DAEMON
pool_nicehash=$DEFAULT_POOL_NICEHASH
pool_self_select=""
pool_address=""
wallet_address=""
pool_password=""
pool_tls_fingerprint=""
verbose=$DEFAULT_VERBOSE
cc_enabled=$DEFAULT_CC_ENABLED
cc_url=""
cc_work_id=""
@@ -251,8 +259,10 @@ parse_args() {
--tls) pool_tls="true"; shift ;;
--keepalive) pool_keepalive="true"; shift ;;
--daemon) pool_daemon="true"; shift ;;
--nicehash) pool_nicehash="true"; shift ;;
--submit-to-origin) pool_submit_to_origin="true"; shift ;;
--self-select) pool_self_select="$2"; shift 2 ;;
--verbose) verbose="true"; shift ;;
--cc) cc_enabled="true"; shift ;;
--cc-tls) cc_tls="true"; shift ;;
-h | --help) show_usage ;;
@@ -317,7 +327,6 @@ main() {
replace_config
create_service
log "$GREEN" "安装完成!"
echo "管理命令:"
if [[ "$os_type" == "alpine" ]]; then
echo " rc-service xxxigcc status"