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

Add configurable GRAVITY_TMPDIR variable into setupVars #5216

Merged
merged 1 commit into from
Mar 22, 2023

Conversation

kot0dama
Copy link
Contributor

What does this PR aim to accomplish?:

This allows users to set up a Gravity updates temporary directory other than /tmp.
Indeed, some systems have a low amount of memory and some users might be reluctant to allocate too much memory to /tmp on these systems. You can look up the Internet for threads where people ask for a way to configure it.

How does this PR accomplish the above?:

I've added support for a GRAVITY_TMPDIR into gravity.sh, defaulting to /tmp if not configured, or if configured directory does not exist/is not a directory.

I've also added a default in the setup tool, I'm not sure that is the way to go though.

This way, users will be able to edit /etc/pihole/setupVars.conf and set/update GRAVITY_TMPDIR to the desired value.
This is probably unnecessary to add it as a step in the configurator though, but feel free to add it if it makes sense.

Link documentation PRs if any are needed to support this PR:

None


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code and I have tested my changes.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)
  6. I have checked that another pull request for this purpose does not exist.
  7. I have considered, and confirmed that this submission will be valuable to others.
  8. I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  9. I give this submission freely, and claim no ownership to its content.

  • I have read the above and my PR is ready for review. Check this box to confirm

gravity.sh Outdated Show resolved Hide resolved
automated install/basic-install.sh Outdated Show resolved Hide resolved
gravity.sh Outdated Show resolved Hide resolved
gravity.sh Outdated Show resolved Hide resolved
@kot0dama
Copy link
Contributor Author

Thanks for reviewing it, I think I've addressed all comments, let me know if there's any issue.
I've pushed another commit but then I can also squash them and force push.

Thank you!

@dschaper
Copy link
Member

Thanks, can you squash and force please?

Signed-off-by: Loïc Gomez <89980752+kot0dama@users.noreply.github.com>
@kot0dama
Copy link
Contributor Author

Thanks, can you squash and force please?

Done and merged development branch again ;)

@dschaper
Copy link
Member

I don't know if this solves #5168 but it's very relevant to that.

@dschaper dschaper merged commit 8f09a1d into pi-hole:development Mar 22, 2023
@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/pi-hole-ftl-v5-22-web-v5-19-and-core-v5-16-1-released/61999/1

@kot0dama kot0dama deleted the development branch March 24, 2023 15:33
@kot0dama
Copy link
Contributor Author

Cool, that was fast !
Thank you !

@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/pihole-tmp-no-space-left-on-device/61797/5

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

Successfully merging this pull request may close these issues.

None yet

3 participants