her / cont-init-setup.sh
guntp's picture
Fix: move Telegram injection to cont-init.d (runs before gateway)
5ce8d41 verified
Raw
History Blame Contribute Delete
738 Bytes
#!/command/with-contenv sh
# =============================================================================
# s6 cont-init.d / 009-hf-setup —— 在官方 01-hermes-setup 之前运行
# 职责:拷贝 config 模板 + SOUL.md(首次启动)
# =============================================================================
set -e
: "${HERMES_HOME:=/opt/data}"
mkdir -p "$HERMES_HOME"
if [ ! -f "$HERMES_HOME/config.yaml" ]; then
cp /opt/hermes-hf/config.template.yaml "$HERMES_HOME/config.yaml"
echo "[hf-hermes] 已拷贝 config 模板到 $HERMES_HOME/config.yaml"
fi
if [ ! -f "$HERMES_HOME/SOUL.md" ]; then
cp /opt/hermes-hf/SOUL.md "$HERMES_HOME/SOUL.md"
echo "[hf-hermes] 已拷贝 SOUL.md 到 $HERMES_HOME/SOUL.md"
fi