fix(wrapper.sh): Redirect stderr to both file and stdout

This commit is contained in:
Michael Carlberg 2016-05-25 14:48:37 +02:00
parent 609f56fb7a
commit d22bd48e8c

View File

@ -24,6 +24,8 @@ pipe="$(mktemp -u /tmp/lemonbuddy.in.XXXXX)"
[ -d "$logdir" ] || mkdir -p "$logdir" [ -d "$logdir" ] || mkdir -p "$logdir"
exec 2> >(tee "$logfile")
mkfifo "$pipe" mkfifo "$pipe"
cleanup_proc() { cleanup_proc() {
@ -35,7 +37,7 @@ cleanup_proc() {
} }
# shellcheck disable=SC2094 # shellcheck disable=SC2094
{ lemonbuddy "$@" -p "$pipe" 2>"$logfile"; kill -TERM $$ 2>/dev/null; } | $lemonbar >"$pipe" & { lemonbuddy "$@" -p "$pipe"; kill -TERM $$ 2>/dev/null; } | $lemonbar >"$pipe" &
trap 'cleanup_proc $!' TERM INT trap 'cleanup_proc $!' TERM INT