shawly / docker-nut

Docker container for https://github.com/blawar/NUT. "latest" & "v3" tags use stable release v3.3. "edge" tag uses latest master source code.
GNU General Public License v3.0
63 stars 8 forks source link

Add support for custom parameters at startup #7

Closed gritstub closed 1 year ago

gritstub commented 2 years ago

Is your feature request related to a problem? Please describe. I want to add --organize to the parameters

Describe the solution you'd like Add a docker variable for extra parameters

Describe alternatives you've considered .

Additional context .

shawly commented 1 year ago

I don't think it makes much sense to add custom parameters since you can call functions like organize through the api at any time when you want to organize your NSPs. Using custom parameters you'd have to restart the container every time.

Just call http://your-nut-host:9000/api/organize for organizing or http://your-nut-host:9000/api/scan for scanning.

shawly commented 1 year ago

Hi again,

so I just switched the build for the edge image to always use the latest master branch from NUT. I also added a feature to run scheduled calls for the API so you can now run scans and organize on a time based schedule via cron.

The new edge image should be available in around an hour. You can check the README to see how you can configure the schedules. By default it will now scan every thirty minutes, to organize you'll have to configure it to do so.

This will stay in the edge image for now, but I might add the schedule feature to the latest release as well.