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

Install/run service from user-agnostic directory #190

Open
solnus opened this issue Aug 22, 2024 · 3 comments
Open

Install/run service from user-agnostic directory #190

solnus opened this issue Aug 22, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@solnus
Copy link
Contributor

solnus commented Aug 22, 2024

When trying to install the service using the provided script, I noticed that it failed due to assumptions about the username and path to the scripts. This should ideally not be necessary to hard-code. Here are a couple of ideas and I can implement whichever one is deemed best if there's some agreement.

Option 1:

  • start-on-boot script installs a copy of the current scripts into /opt somewhere, and uses that path. Downside is that it requires updating /opt whenever there are changes, if development isn't being done in /opt.

Option 2:

  • start-on-boot script creates a symlink for kiln-controller in /usr/local/bin (or /opt), so it still sources from the user directory, but the script installation is agnostic of the actual path

Option 3:

  • Dynamically generate the init script to directy point at the kiln-controller in the current directory as of running start-on-boot
@jbruce12000
Copy link
Owner

I really have no opinion on this. I'm willing to accept a PR for this. PR should be limited in scope and solve just THIS problem.

@jbruce12000 jbruce12000 added the bug Something isn't working label Aug 22, 2024
@potus31
Copy link

potus31 commented Sep 14, 2024

Which files do you have to re-hardcode with /home/[USERNAME]/kiln-controller/ when it's not home/pi

@solnus
Copy link
Contributor Author

solnus commented Sep 14, 2024

The following files have hard-coded paths with the assumed pi username:

lib/init/kiln-controller.service
start-on-boot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants