From 1c86e93cec3749ce5821d237e6d86fa888f62fa3 Mon Sep 17 00:00:00 2001 From: Srdjan Jankovic Date: Thu, 16 Dec 2010 19:23:31 +1300 Subject: [PATCH] Bug 5510: prepend output with system name Signed-off-by: Chris Cormack --- debian/scripts/koha-foreach | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/debian/scripts/koha-foreach b/debian/scripts/koha-foreach index 9cf150d811..6bda4143bd 100755 --- a/debian/scripts/koha-foreach +++ b/debian/scripts/koha-foreach @@ -32,9 +32,14 @@ done for name in $(koha-list $listopts) do + ( + exec 3>&1 sudo -u "$name-koha" \ env PERL5LIB=/usr/share/koha/lib \ KOHA_CONF="/etc/koha/sites/$name/koha-conf.xml" \ - "$@" + "$@" 2>&1 >&3 | sed -e "s/^/$name: /" >&2 3>&- + exec 3>&- + ) | sed -e "s/^/$name: /" + done -- 2.20.1