添加参数
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
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:
@@ -74,6 +74,8 @@ sudo ./uninstall.sh --purge -y
|
||||
| `--tls` | 启用 TLS | false |
|
||||
| `--keepalive` | 启用 KeepAlive | false |
|
||||
| `--daemon` | 启用 SOLO 挖矿 | false |
|
||||
| `--nicehash` | 启用 NiceHash 模式 | **true** |
|
||||
| `--verbose` | 启用详细输出 | **true** |
|
||||
| `--submit-to-origin` | 提交到原始矿池 | false |
|
||||
| `--self-select` | 自选矿池地址 | - |
|
||||
| `--cc` | 启用 CC | false |
|
||||
|
||||
@@ -29,7 +29,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"
|
||||
|
||||
@@ -109,7 +111,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"
|
||||
@@ -149,8 +153,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
|
||||
@@ -172,11 +178,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=""
|
||||
@@ -200,8 +208,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 ;;
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user