[Bug 8566] New: Enable koha-foreach to insert the instancename into commands
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8566 Priority: P5 - low Change sponsored?: --- Bug ID: 8566 CC: robin@catalyst.net.nz Assignee: koha-bugs@lists.koha-community.org Summary: Enable koha-foreach to insert the instancename into commands Severity: enhancement Classification: Unclassified OS: All Reporter: magnus@enger.priv.no Hardware: All Status: NEW Version: master Component: Packaging Product: Koha The synopsis for koha-foreach looks like this: koha-foreach [--enabled] [--email|--noemail] [command] It is used e.g. in cron configs, like this: koha-foreach --enabled /usr/share/koha/bin/cronjobs/fines.pl It would be very useful if we could provide a placeholder in the command, which could then be replaced with the name of the current instance. Then we could do e.g.: koha-foreach --enabled /usr/share/koha/bin/cronjobs/fines.pl --out /var/log/koha/__instancename__ and have fines.pl use the right directory for each instance. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8566 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |8567 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8566 Reed Wade <reed@typist.geek.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |reed@typist.geek.nz --- Comment #1 from Reed Wade <reed@typist.geek.nz> --- Created attachment 29270 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29270&action=edit patch for feature update koha-foreach has been modified to replace __instancename__ with $name on each iteration using sed. The docbook file for koha-foreach has also been updated to reflect the new functionality. To test: koha-foreach ls -ld /etc/koha/sites/__instancename__ should list directories instead of giving an error message. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8566 Reed Wade <reed@typist.geek.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff --- Comment #2 from Reed Wade <reed@typist.geek.nz> --- I haven't submitted in a while. Let me know if I've borked a step. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8566 --- Comment #3 from Magnus Enger <magnus@enger.priv.no> --- Created attachment 29273 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29273&action=edit Bug 8566: Enable koha-foreach to insert the instancename into commands koha-foreach has been modified to replace __instancename__ with $name on each iteration using sed. The docbook file for koha-foreach has also been updated to reflect the new functionality. To test: koha-foreach ls -ld /etc/koha/sites/__instancename__ should list directories instead of giving an error message. Signed-off-by: Magnus Enger <digitalutvikling@gmail.com> The suggested example with ls works as expected, as does my more complex example with fines.pl: koha-foreach --enabled /usr/share/koha/bin/cronjobs/fines.pl \ --out /var/log/koha/__instancename__/ The man page looks good too. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8566 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Small patch -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8566 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29270|0 |1 is obsolete| | Attachment #29273|0 |1 is obsolete| | --- Comment #4 from Magnus Enger <magnus@enger.priv.no> --- Created attachment 29274 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29274&action=edit Bug 8566: [SIGNED-OFF] Enable koha-foreach to insert the instancename into commands koha-foreach has been modified to replace __instancename__ with $name on each iteration using sed. The docbook file for koha-foreach has also been updated to reflect the new functionality. To test: koha-foreach ls -ld /etc/koha/sites/__instancename__ should list directories instead of giving an error message. Signed-off-by: Magnus Enger <digitalutvikling@gmail.com> The suggested example with ls works as expected, as does my more complex example with fines.pl: koha-foreach --enabled /usr/share/koha/bin/cronjobs/fines.pl \ --out /var/log/koha/__instancename__/ The man page looks good too. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8566 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8566 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29274|0 |1 is obsolete| | --- Comment #5 from Robin Sheat <robin@catalyst.net.nz> --- Created attachment 29309 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29309&action=edit Bug 8566: [SIGNED-OFF] Enable koha-foreach to insert the instancename into commands koha-foreach has been modified to replace __instancename__ with $name on each iteration using sed. The docbook file for koha-foreach has also been updated to reflect the new functionality. To test: koha-foreach ls -ld /etc/koha/sites/__instancename__ should list directories instead of giving an error message. Signed-off-by: Magnus Enger <digitalutvikling@gmail.com> The suggested example with ls works as expected, as does my more complex example with fines.pl: koha-foreach --enabled /usr/share/koha/bin/cronjobs/fines.pl \ --out /var/log/koha/__instancename__/ The man page looks good too. Signed-off-by: Robin Sheat <robin@catalyst.net.nz> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8566 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Reed! -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org