fix: secp256k1. node download error
Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
@ -18,5 +18,5 @@
|
||||
|
||||
### 后续重启或运行
|
||||
- 之后启动 不需要输入命令 直接双击执行当前目录下的 `OneKeyTera.sh` 即可
|
||||
|
||||
- 
|
||||
- 如果有问题 请反馈给 QQ 502647092
|
||||
|
15
tera/run.sh
15
tera/run.sh
@ -9,22 +9,22 @@ c_green="\033[38;5;2m"
|
||||
c_reset="\033[0m"
|
||||
c_yellow="\033[38;5;3m"
|
||||
|
||||
c_prefix="${c_blue}${SHELL_PREFIX}>>${c_reset}"
|
||||
c_prefix="${c_green}${SHELL_PREFIX}>>${c_reset}"
|
||||
|
||||
dateStr() {
|
||||
echo -e "[$(date '+%H:%M:%S')]"
|
||||
}
|
||||
|
||||
info() {
|
||||
echo -e "${c_prefix}$(dateStr) ${*}"
|
||||
echo -e "$(dateStr)${c_prefix} ${*}"
|
||||
}
|
||||
|
||||
warn() {
|
||||
echo -e "${c_prefix}$(dateStr) ${c_yellow}${*}${c_reset}"
|
||||
echo -e "$(dateStr)${c_prefix} ${c_yellow}${*}${c_reset}"
|
||||
}
|
||||
|
||||
error() {
|
||||
echo -e "${c_prefix}$(dateStr) ${c_red}${*}${c_reset}"
|
||||
echo -e "$(dateStr)${c_prefix} ${c_red}${*}${c_reset}"
|
||||
}
|
||||
#====================
|
||||
|
||||
@ -45,7 +45,7 @@ fi
|
||||
echo $(date +%s) > .lock
|
||||
info "程序将在 3秒 后运行... Ctrl + C 取消运行..."
|
||||
sleep 2
|
||||
info "开始检测安装依赖..."
|
||||
info "开始检测运行环境..."
|
||||
if [[ -z "$(which node)" ]]; then
|
||||
if [[ ! -d node ]]; then
|
||||
warn "未安装NodeJS 开始下载二进制包 请稍候..."
|
||||
@ -80,6 +80,7 @@ fi
|
||||
|
||||
if [[ ! -f "${TERA_ROOT}/node_modules/secp256k1/build/Release/secp256k1.node" ]]; then
|
||||
warn "未检测到 secp256k1.node 模块 开始下载 Windows 版本..."
|
||||
mkdir -p "${TERA_ROOT}/node_modules/secp256k1/build/Release"
|
||||
curl -o "${TERA_ROOT}/node_modules/secp256k1/build/Release/secp256k1.node" https://git.yumc.pw/cloud/script/raw/master/tera/secp256k1.node
|
||||
fi
|
||||
|
||||
@ -108,8 +109,8 @@ info "设置NTP服务器为阿里云地址 ${TERA_NTP_SERVER}"
|
||||
sed -i s@pool.ntp.org@${TERA_NTP_SERVER}@g ${TERA_ROOT}/core/library.js
|
||||
|
||||
info "开始启动挖矿进程..."
|
||||
echo "setTimeout(()=>require('child_process').exec('start http://127.0.0.1'), 3000)" > temp.js
|
||||
"${NODE}" temp.js && info "启动完成 打开系统默认浏览器..." && rm -rf temp.js &
|
||||
echo "setTimeout(()=>require('child_process').exec('start http://127.0.0.1'), 5000)" > temp.js
|
||||
"${NODE}" temp.js && info "启动完成 打开系统默认浏览器..." && rm -rf temp.js &
|
||||
while true; do
|
||||
"${NODE}" run-node.js
|
||||
echo "程序已关闭 将在3秒后重启 Ctrl + C 取消运行..."
|
||||
|
Reference in New Issue
Block a user