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

Don't break when no home directory can be found #102

Merged
merged 1 commit into from
Mar 23, 2020

Conversation

fasmide
Copy link
Contributor

@fasmide fasmide commented Mar 23, 2020

The systemd example provided in the readme cannot run because mbmd refuses to start when it's unable to figure out a home directory.

pi@powermeter:~ $ journalctl -u mbmd.service 
-- Logs begin at Sun 2020-03-22 23:45:11 GMT, end at Mon 2020-03-23 09:37:22 GMT. --
Mar 23 09:37:16 powermeter systemd[1]: Started mbmd.
Mar 23 09:37:16 powermeter mbmd[898]: $HOME is not defined
Mar 23 09:37:16 powermeter systemd[1]: mbmd.service: Main process exited, code=exited, status=1/FAILURE
Mar 23 09:37:16 powermeter systemd[1]: mbmd.service: Failed with result 'exit-code'.
Mar 23 09:37:17 powermeter systemd[1]: mbmd.service: Service RestartSec=100ms expired, scheduling restart.
Mar 23 09:37:17 powermeter systemd[1]: mbmd.service: Scheduled restart job, restart counter is at 1.
Mar 23 09:37:17 powermeter systemd[1]: Stopped mbmd.

This pull request adds the home directory if it can be determined, otherwise continues without it.

@andig andig added the enhancement New feature or request label Mar 23, 2020
@andig andig merged commit 9d53a95 into volkszaehler:master Mar 23, 2020
@andig
Copy link
Contributor

andig commented Mar 23, 2020

Thanks for catching this one, great PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants