Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemd service: Unable to determine the HOME environment variable #1849

Closed
elboulangero opened this issue Jul 20, 2020 · 0 comments
Closed

Comments

@elboulangero
Copy link
Contributor

elboulangero commented Jul 20, 2020

    GoAccess - version 1.4 - May 18 2020 01:45:26
    Config file: No config file used
    Fatal error has occurred
    Error occurred at: src/util.c - get_home - 453
    Unable to determine the HOME environment variable.

When running from a systemd service, there's very few environment
variables defined. Which env variables are available exactly is
explained here

Short version, here's what printenv gives me, in a script that is
spawned by logrotate, which is itself started daily by systemd:

    + printenv
    PWD=/
    LANG=en_US.UTF-8
    INVOCATION_ID=dbefda3a93634d16bca7ba0e077d57da
    SHLVL=1
    JOURNAL_STREAM=9:52249
    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    _=/usr/bin/printenv

I think GoAccess should not fail in this case. If it can't get the env
variable HOME, then it means there's no file HOME/.goaccessrc,
and GoAccess should be happy with that and just keep going.

What do you think? See PR #1850.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants