Giter Club home page Giter Club logo

Comments (10)

thelamer avatar thelamer commented on June 9, 2024 1

Optimally it would go as follows:

  1. If statement for does /config/modules directory exist
  2. If statement are build tools installed ? if not run apk commands to install them in container
  3. Build array of cpp files using find in the /config/modules directory ($MODULES)
  4. ensure $MODULES array is not empty
  5. Build array of cpp files using find in the /usr/share/znc/modules directory ($INSTALLED)
  6. For loop through the array of new modules (for MODULE in $MODULES; do ...)
  7. If statement in loop should compare the basename of the cpp file to the whole array of installed cpp files ( if [[ "$(basename "$MODULE")" != *"$INSTALLED"* ]]; then )
  8. run znc-buildmod and copy the directory to /usr/share/znc/modules

On subsequent runs it should see that the module was already built and copied inside the container. If the user upgrades the container they will be rebuilt and copied. If it has already installed a module it will not do it again.

Let me know if any of this does not make sense.

from docker-znc.

thelamer avatar thelamer commented on June 9, 2024

How do you propose we handle this?
It sounds like you have a grasp on this, the logic could be an if statement that looks for a modules folder and installs build dependencies, then builds and moves the output to /usr/share/znc/modules.

Are you interested in loop testing and creating a PR for something like this?

from docker-znc.

dewey avatar dewey commented on June 9, 2024

I'm not sure what's the best way of doing it in this case. From my understanding it's downloading the hardcoded modules, putting them into /tmp/znc/modules and then running make in /tmp/znc to build all of that. I usually always did it with znc-buildmod but I guess make also includes building the modules folder.

Maybe the steps would be:

  1. In https://github.com/linuxserver/docker-znc/blob/master/Dockerfile#L28 we do:
mkdir -p \
	/tmp/znc/modules
  1. We could just COPY the content of /znc-config/modules to /tmp/znc/modules

  2. It'll download the default modules via curl like right now

  3. Everything will be built here as usual https://github.com/linuxserver/docker-znc/blob/master/Dockerfile#L77

I'll have to give it a try and if that works will open a MR. Let me know if you see any obvious mistakes.

from docker-znc.

CHBMB avatar CHBMB commented on June 9, 2024

@dewey Any feedback on this?

from docker-znc.

dewey avatar dewey commented on June 9, 2024

@CHBMB I think it's would be a good strategy of doing it. Unfortunately I didn't have time to look at it myself yet and I always have it on my list. If someone else wants to go ahead with it that would be great but otherwise I'll see what I can do at some point.

from docker-znc.

CHBMB avatar CHBMB commented on June 9, 2024

@dewey We'll wait for you, nobody else has requested it, so I guess it's not a pressing change.

from docker-znc.

mattberther avatar mattberther commented on June 9, 2024

Something like #16 ?

from docker-znc.

DarthGandalf avatar DarthGandalf commented on June 9, 2024

(and also have no intent on changing that)

@dewey Could you explain? Did fix of znc/znc-docker#20 not work for you?

from docker-znc.

dewey avatar dewey commented on June 9, 2024

@DarthGandalf Sorry I don't remember that any more, that was a while ago and I'm currently not running ZNC :(

Thanks for following up though, if I set it up again I'll update it here.

from docker-znc.

github-actions avatar github-actions commented on June 9, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from docker-znc.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.