Skip to content

[Bug]: Systemd Gateway installation does not honor non-standard HERMES_HOME env variable #6729

@steromano87

Description

@steromano87

Bug Description

When a non-standard Hermes home location is set using HERMES_HOME as global environment variable (e.g. inside /etc/profile file), installing a system-wide Systemd unit does not carry over the variable value and always sets it as the default ~/.hermes folder for the current user.

See also #5947

Steps to Reproduce

  1. Set the HERMES_HOME variable toba standard location (e.g. /etc/hermes-home)
  2. Install the gateway Systemd unit system-wide: sudo hermes gateway install --system (note: the bug may also occur in case of user-scoped installation, but was not tested)
  3. Inspect the generated Systemd unit file

Expected Behavior

The Environment declaration for HERMES_HOME variable inside the unit file should honor the value of the globally set HERMES_HOME variable

Actual Behavior

The value of the HERMES_HOME variable inside the unit file is always hardcoded to the standard home location for the current user (~/.hermes)

Affected Component

Setup / Installation

Messaging Platform (if gateway-related)

No response

Operating System

Debian Trixie

Python Version

3.11.9

Hermes Version

0.8.0

Relevant Logs / Traceback

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions