Bug 7667

Summary: add a koha-setenv or an improved koha-foreach
Product: Koha Reporter: MJ Ray (software.coop) <mjr>
Component: PackagingAssignee: Robin Sheat <robin>
Status: RESOLVED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P5 - low CC: tomascohen
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: Seeking cosponsors
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description MJ Ray (software.coop) 2012-03-07 18:32:02 UTC
there should be an easy way to set the environment variables for a site in /etc/koha/sites, or to run a command on only one site through
	      koha-foreach, or an interactive subshell.
Comment 1 Robin Sheat 2012-03-07 21:44:38 UTC
So basically something that lets you do, e.g.

koha-setenv mylibrary

that drops you into a shell as the appropriate koha user with the KOHA_CONF variables set up? Cos that sounds like a useful thing to have to me. 

I'm in the habit of doing stuff like "sudo -u koha-mylibrary env KOHA_CONF=... command" but it'd be a good habit to break.
Comment 2 Tomás Cohen Arazi (tcohen) 2014-07-02 19:05:23 UTC
This is the functionality 'koha-shell' provides already.
Comment 3 MJ Ray (software.coop) 2014-07-09 12:16:48 UTC
koha-shell was added on 2012-12-20 (9 months after this report) for Bug 8878, but thanks for tidying this up. Changing the resolution to match.

*** This bug has been marked as a duplicate of bug 8878 ***