http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12824 Bug ID: 12824 Summary: Create a general purpose koha-config script? Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: new feature Priority: P5 - low Component: Packaging Assignee: koha-bugs@lists.koha-community.org Reporter: magnus@enger.priv.no QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz The discussion over on bug 12805 (and specifically bug 12805, comment 5 from Viktor) got me thinking... Could we create a general purpose config editing script, at least for the <config> part of koha-conf.xml, instead of having specific scripts for lots of different config settings? If we added a (e.g.) YAML file with some metadata about the different setttings (a description, what kind of data it should contain), we could perhaps have a friendly tool that could - toggle settings off/on ("backup_db_via_tools is currently off, are you sure you want to enable it?") - offer options from a list (e.g. "dom" or "grs1" for the indexing modes) - validate the contents of fields (e.g. check that "port" gets a numeric value, or check that settings that take a path get a path that actually exists) Sample usage: Display all current settings: sudo koha-config -l <instancename> Display a specific setting: sudo koha-config <instancename> opacdir Change a specific setting: sudo koha-config <instancename> backup_db_via_tools=on (If backup_db_via_tools was already enabled, the script could say so and exit, if it was not enabled, it could verify that the user wants to change it, and make sure the value of the setting gets a 1. It could accept different input like "on", "1", "enable" etc) There could even be an interactive mode (sudo koha-config -i <instancename>) which would display something like a numbered list of current settings, let the user choose one and prompt for input, validate the input, display the changed setting etc. Of course, some config changes need more work than just changing the setting. If the user tries to e.g. enable plugins by changing the "enable_plugins" setting, the script could give a friendly warning that the user should instead use the koha-enable-plugins script. The script could perhaps take a --configfile parameter, so it could be used to edit configs for non-package-setups too. Would this just be a lot of work for little gain, or could it be a nice addition for making the threshold lower for inexperienced admins? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.