Bug 7667 - add a koha-setenv or an improved koha-foreach
Summary: add a koha-setenv or an improved koha-foreach
Status: RESOLVED DUPLICATE of bug 8878
Alias: None
Product: Koha
Classification: Unclassified
Component: Packaging (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Robin Sheat
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-07 18:32 UTC by MJ Ray (software.coop)
Modified: 2014-07-09 12:16 UTC (History)
1 user (show)

See Also:
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:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***