Revert "fix: avoid logging to stdout before running scp to copy tarball"
This reverts commit f8a09a135b87d18f4ff33b1a75b27f030253b499.
This commit is contained in:
parent
0e2f89bde4
commit
5181a3c194
@ -18,13 +18,7 @@ log() {
|
|||||||
echo "[$(date '+%Y-%m-%d %H:%M:%S')] [$level] $*" | tee -a "$LOG_FILE"
|
echo "[$(date '+%Y-%m-%d %H:%M:%S')] [$level] $*" | tee -a "$LOG_FILE"
|
||||||
}
|
}
|
||||||
|
|
||||||
logO() {
|
log info "Received SSH_ORIGINAL_COMMAND: $SSH_ORIGINAL_COMMAND"
|
||||||
local level="${1^^}" # convert to uppercase
|
|
||||||
shift
|
|
||||||
echo "[$(date '+%Y-%m-%d %H:%M:%S')] [$level] $*" >>"$LOG_FILE"
|
|
||||||
}
|
|
||||||
|
|
||||||
logO info "Received SSH_ORIGINAL_COMMAND: $SSH_ORIGINAL_COMMAND"
|
|
||||||
|
|
||||||
if [[ "${SSH_ORIGINAL_COMMAND:-}" == "scp -t $ALLOWED_PATH" ]]; then
|
if [[ "${SSH_ORIGINAL_COMMAND:-}" == "scp -t $ALLOWED_PATH" ]]; then
|
||||||
exec scp -t "ALLOWED_PATH"
|
exec scp -t "ALLOWED_PATH"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user