mirror of
https://github.com/hotwa/luci-app-openclaw.git
synced 2026-03-31 04:52:33 +00:00
feat(storage): support configurable install root
Add a LuCI install-root input, persist the selected path in UCI, and route install, status, backup, uninstall, and runtime scripts through the configured storage root for new installs. Reference: custom install root flow
This commit is contained in:
@@ -2,12 +2,11 @@
|
||||
# ============================================================================
|
||||
# luci-app-openclaw — 全局环境变量
|
||||
# 仅在 Node.js 已安装时生效,为 SSH 登录用户提供正确的运行环境
|
||||
# 解决 Issue #42: 统一配置文件路径,避免 /root/.openclaw 与 /opt/openclaw/data/.openclaw 混乱
|
||||
# 解决 Issue #42: 统一配置文件路径,避免 /root/.openclaw 与运行目录混乱
|
||||
# ============================================================================
|
||||
|
||||
NODE_BASE="/opt/openclaw/node"
|
||||
OC_GLOBAL="/opt/openclaw/global"
|
||||
OC_DATA="/opt/openclaw/data"
|
||||
. /usr/libexec/openclaw-paths.sh
|
||||
oc_load_paths "$OPENCLAW_INSTALL_ROOT"
|
||||
|
||||
# 检查 Node.js 是否已安装
|
||||
[ -x "${NODE_BASE}/bin/node" ] || return 0
|
||||
|
||||
Reference in New Issue
Block a user