Skip to content

ERROR: Can not read EnvironmentFile No such file or directory #54

@ShreyasMahangade

Description

@ShreyasMahangade

When created custom postgres service unit file with below extra line in unit file:

EnvironmentFile=-/path/to/env

Enable the custom unit and initialize DB:

# /usr/bin/systemctl enable custom-pg.service
# postgresql-setup --initdb --unit custom-pg --port 3333
ERROR: Can not read EnvironmentFile 'EnvironmentFiles=/path/to/env' specified
        in custom-pg.service
/usr/bin/postgresql-setup: line 415: EnvironmentFiles=/path/to/env: No such file or directory

Note: Line number 415 because this was reproduced on RHEL system not on upstream scripts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions