diff --git a/gitops_router.sh b/gitops_router.sh index b874968..e5280da 100644 --- a/gitops_router.sh +++ b/gitops_router.sh @@ -18,13 +18,7 @@ log() { echo "[$(date '+%Y-%m-%d %H:%M:%S')] [$level] $*" | tee -a "$LOG_FILE" } -logO() { - 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" +log info "Received SSH_ORIGINAL_COMMAND: $SSH_ORIGINAL_COMMAND" if [[ "${SSH_ORIGINAL_COMMAND:-}" == "scp -t $ALLOWED_PATH" ]]; then exec scp -t "ALLOWED_PATH"