修复 Hermes root 安装和 systemd 启动兼容性#21
Draft
kylezhang wants to merge 1 commit into
Draft
Conversation
Collaborator
|
Hi @kylezhang,感谢提交这个 PR! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
在一台 Ubuntu 服务器上按 Hermes system service/root 方式安装后,接入 memory-tencentdb 时遇到了几个兼容性问题:
/usr/local/lib/hermes-agent,但脚本只检查~/.hermes/hermes-agent。root直接执行脚本时会再次su - root进入脚本,容易形成递归。npx tsx ...,在 systemd + nvm 场景下容易因为 PATH 不同找不到node。修改
HERMES_AGENT_DIR显式指定 Hermes 代码目录,并自动兼容/usr/local/lib/hermes-agent。root直接执行时按 root 环境安装;需要指定用户时可用MEMORY_TENCENTDB_USER=<username>。node的绝对路径,减少 systemd PATH 差异导致的启动失败。/etc/profile.d时兼容 root/non-root 两种执行方式。验证
bash -n scripts/install_hermes_memory_tencentdb.shgit diff --checkCloses #18
Closes #19
Closes #20