Bug 5510: prepend output with system name

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
Srdjan Jankovic 2010-12-16 19:23:31 +13:00 committed by Chris Cormack
parent bd8f379d70
commit 1c86e93cec

View file

@ -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