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

[FEAT] Disable Copying Defaults/Samples Via Environment Variable #450

Closed
1 task done
7H3LaughingMan opened this issue Jan 24, 2024 · 2 comments
Closed
1 task done
Labels
enhancement New feature or request

Comments

@7H3LaughingMan
Copy link

Is this a new feature request?

  • I have searched the existing issues

Wanted change

I would like for a way to disable SWAG from copying over the defaults/samples on startup, this could be implemented via an optional environment variable that when set skips the copying.

Reason for change

It can be a little annoying making sure I am opening the correct configuration files since I have to double check constantly. Making it an optional environment variable means that by default nothing changes, but for some people having an option to disable it might be nice t o them.

Proposed code change

cp -n /defaults/dns-conf/* /config/dns-conf/ 2> >(grep -v 'cp: not replacing')

https://github.com/linuxserver/docker-swag/blob/e568785908799cd0f202bc5cf169d77e98d80800/root/etc/s6-overlay/s6-rc.d/init-fail2ban-config/run

https://github.com/linuxserver/docker-swag/blob/e568785908799cd0f202bc5cf169d77e98d80800/root/etc/s6-overlay/s6-rc.d/init-nginx-config/run

https://github.com/linuxserver/docker-swag/blob/e568785908799cd0f202bc5cf169d77e98d80800/root/etc/s6-overlay/s6-rc.d/init-samples-config/run

These are the scripts that are responsible for copying over the defaults, my suggestion is to have an environment variable that takes a list like "DISABLE_DEFAULTS=dns,fail2ban,nginx,samples" so you can disable only the ones you want and the scripts are checking to see if dns is in there or nginx is in there and if so not to copy.

@7H3LaughingMan 7H3LaughingMan added the enhancement New feature or request label Jan 24, 2024
Copy link

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@aptalca
Copy link
Member

aptalca commented Jan 24, 2024

Too much trouble for too little (to no) gain.

You can customize it yourself if it bothers you too much: https://www.linuxserver.io/blog/2019-09-14-customizing-our-containers

@aptalca aptalca closed this as not planned Won't fix, can't repro, duplicate, stale Jan 24, 2024
@LinuxServer-CI LinuxServer-CI moved this from Issues to Done in Issue & PR Tracker Jan 24, 2024
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
Archived in project
Development

No branches or pull requests

2 participants