Merge pull request #1859 from steveonjava/feat/hermesagent-setup-helper
Feat/hermesagent setup helper
This commit is contained in:
@@ -67,7 +67,7 @@ description
|
|||||||
msg_ok "Completed successfully!\n"
|
msg_ok "Completed successfully!\n"
|
||||||
echo -e "${CREATING}${GN}Hermes Agent setup has been successfully initialized!${CL}"
|
echo -e "${CREATING}${GN}Hermes Agent setup has been successfully initialized!${CL}"
|
||||||
echo -e "${INFO}${YW} Configure your model provider and gateway server inside the container:${CL}"
|
echo -e "${INFO}${YW} Configure your model provider and gateway server inside the container:${CL}"
|
||||||
echo -e "${TAB}${BGN}su - hermes${CL}"
|
echo -e "${TAB}${BGN}hermes-setup${CL}"
|
||||||
echo -e "${TAB}${BGN}hermes setup${CL}"
|
echo -e "${INFO} When prompted to install the gateway service, choose 'user service'.${CL}"
|
||||||
echo -e "${INFO}${YW}Key for Hermes API Server stored in:${CL}"
|
echo -e "${INFO}${YW} Key for Hermes API Server stored in:${CL}"
|
||||||
echo -e "${TAB}${BGN}/home/hermes/.hermes/.env${CL}"
|
echo -e "${TAB}${BGN}/home/hermes/.hermes/.env${CL}"
|
||||||
|
|||||||
@@ -93,10 +93,23 @@ EOF
|
|||||||
systemctl enable -q --now hermes-dashboard
|
systemctl enable -q --now hermes-dashboard
|
||||||
msg_ok "Created Dashboard Service"
|
msg_ok "Created Dashboard Service"
|
||||||
|
|
||||||
|
msg_info "Creating Setup Helper"
|
||||||
|
cat <<'SETUP' >/usr/bin/hermes-setup
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -a; source /etc/default/hermes; set +a
|
||||||
|
/home/hermes/.local/bin/hermes setup
|
||||||
|
chown -R hermes:hermes /home/hermes
|
||||||
|
chmod 750 /home/hermes
|
||||||
|
chmod 700 /home/hermes/.hermes
|
||||||
|
echo "Hermes setup complete. File permissions restored."
|
||||||
|
SETUP
|
||||||
|
chmod +x /usr/bin/hermes-setup
|
||||||
|
msg_ok "Created Setup Helper"
|
||||||
|
|
||||||
msg_info "Configuring Login Hints"
|
msg_info "Configuring Login Hints"
|
||||||
cat <<'HINT' >/etc/profile.d/hermes-hint.sh
|
cat <<'HINT' >/etc/profile.d/hermes-hint.sh
|
||||||
if [[ "$(id -u)" -eq 0 ]]; then
|
if [[ "$(id -u)" -eq 0 ]]; then
|
||||||
echo " Use 'su - hermes' to switch to the hermes user for running Hermes Agent."
|
echo " Run 'hermes-setup' to configure your model provider and gateway server."
|
||||||
fi
|
fi
|
||||||
HINT
|
HINT
|
||||||
msg_ok "Configured Login Hints"
|
msg_ok "Configured Login Hints"
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
"type": "warning"
|
"type": "warning"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "After container startup, login, switch to the hermes user (su - hermes) and run 'hermes setup' to configure your model provider and gateway server.",
|
"text": "After container startup, login as root and run 'hermes-setup' to configure your model provider and gateway server. When prompted to install the gateway service, install it as a user service (not a system service).",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user