Fixed use of incorrect variable
This commit is contained in:
parent
abf3fed939
commit
49c111a867
@ -1,9 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# shellcheck disable=SC2034 # false flags nameref params
|
# shellcheck disable=SC2034 # false flags nameref params
|
||||||
|
|
||||||
# =====================
|
# ======================
|
||||||
# Require shell options
|
# Required shell options
|
||||||
# =====================
|
# ======================
|
||||||
|
|
||||||
# Necessary for piping to "send" funciton
|
# Necessary for piping to "send" funciton
|
||||||
shopt -s lastpipe
|
shopt -s lastpipe
|
||||||
@ -12,13 +12,13 @@ shopt -s lastpipe
|
|||||||
# Setup Functions
|
# Setup Functions
|
||||||
# ===============
|
# ===============
|
||||||
|
|
||||||
# $1: Log file to redirect output
|
# $1: Log file for redirecting stdout to
|
||||||
function redirectStdout() {
|
function redirectStdout() {
|
||||||
local output="$1";
|
local output="$1";
|
||||||
[ -z "$output" ] && output="/dev/null";
|
[ -z "$output" ] && output="/dev/null";
|
||||||
|
|
||||||
exec 5<&1;
|
exec 5<&1;
|
||||||
_exprashRedirectStdout="$1";
|
_exprashRedirectStdout="$output";
|
||||||
exec 1>>"$_exprashRedirectStdout";
|
exec 1>>"$_exprashRedirectStdout";
|
||||||
printf '%s: %s\n' "${REQUEST_METHOD:-UNKNOWN}" "${PATH_INFO:-/}"
|
printf '%s: %s\n' "${REQUEST_METHOD:-UNKNOWN}" "${PATH_INFO:-/}"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user