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

Regarding Systemd #15

Open
barza-k opened this issue Jun 8, 2023 · 1 comment
Open

Regarding Systemd #15

barza-k opened this issue Jun 8, 2023 · 1 comment

Comments

@barza-k
Copy link

barza-k commented Jun 8, 2023

I have problems with getting this running as a service. Your Instructions are very unclear to me since im not familar with creating systemd services. A better explanation of where to put what to get the service running would be great, hope you could help me out.

@poita66
Copy link
Contributor

poita66 commented Jul 18, 2023

The instructions are a little broken. I'll submit a PR to get that fixed.

In the interim, here's my service file (saved at ~/.config/systemd/user/halinuxcompanion.service:

[Unit]
Description=Home Assistant Linux Companion
Documentation=https://github.com/muniter/halinuxcompanion
After=networking.target

[Service]
WorkingDirectory=%h/.config/halinuxcompanion
ExecStart=python3 -m halinuxcompanion -c config.json
Restart=always
RestartSec=30

[Install]
WantedBy=default.target

I've copied the repo to ~/.config/halinuxcompanion, which is also where the config.json needs to reside.

To start the service:

systemctl --user enable --now halinuxcompanion.service

Hope that helps!

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

No branches or pull requests

2 participants