opc-agent 4.1.16 → 4.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +119 -48
- package/README.md +290 -933
- package/README.zh-CN.md +269 -497
- package/install.sh +7 -1
- package/package.json +1 -1
package/install.sh
CHANGED
|
@@ -83,8 +83,14 @@ fi
|
|
|
83
83
|
|
|
84
84
|
# ── 安装 OPC Agent ────────────────────────────────────────────
|
|
85
85
|
step "🚀 安装 OPC Agent / Installing OPC Agent"
|
|
86
|
+
# Try without sudo first; if EACCES, retry with sudo
|
|
86
87
|
info "运行 npm install -g opc-agent ..."
|
|
87
|
-
npm install -g opc-agent
|
|
88
|
+
if npm install -g opc-agent 2>/dev/null; then
|
|
89
|
+
: # success
|
|
90
|
+
else
|
|
91
|
+
warn "权限不足,尝试 sudo / Permission denied, retrying with sudo..."
|
|
92
|
+
sudo npm install -g opc-agent
|
|
93
|
+
fi
|
|
88
94
|
|
|
89
95
|
OPC_VER=$(opc --version 2>/dev/null || echo "unknown")
|
|
90
96
|
ok "OPC Agent v${OPC_VER} 安装成功 / installed successfully"
|