Nold360/docker-borgserver

Ignore (hidden) files in sshkeys/clients directory

JenswBE opened this issue · 3 comments

Would it be possible to include a way to ignore hidden files like .gitignore and .gitkeep in the clients folder?

Should be easy to implement by changing following code in data/run.sh:
find ${SSH_KEY_DIR}/clients -type f -not -name ".*" | wc -l and find "${SSH_KEY_DIR}/clients" -type f -not -name ".*"

I didn't create a Pull request, as I wasn't sure which option would seem the best to you:

  • Hardcoded hidden files (.*)
  • Hardcoded hidden git files (.git*)
  • Environment variable, empty by default => No impact on existing setups

Personally, I feel the environment variable is the way to go. As it very easy to implement and can be set dynamically by the user.

Thanks on advance!

Hi,

thx man, you're right! hidden files should be ignored. Also i like the idea of having the keys in a git.. i will think about that, too!

Sounds cool to just have it pull a git on startup, instead of having a volume for that.. plus it would also work on kubernetes i guess 🤔

Thanks for the quick reply and enthusiasm! FYI, my usecase for this is to store my whole VPS config in a git repo. Including required config dirs on advance (with .gitkeep) eases deployment even further. Example in my repo

As I'm targetting this repo to be "clean" for other people to clone, I'm not planning to include the keys in the repo. But might be a very handy usecase indeed!

Solved in 7643f16