File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ while [[ $# -gt 0 ]]; do
6565done
6666
6767log () { printf ' [%s] %s\n' " $( date -u +%H:%M:%S) " " $* " >&2 ; }
68- find_ds_archive_cmd=' ls -1t dovecot-sysreport-*.tar.* 2>/dev/null | head -n1'
68+ find_ds_archive_cmd=' ls -1t /tmp/ dovecot-sysreport-*.tar.* 2>/dev/null | head -n1'
6969
7070# ------------------------------------------------------------------------------
7171# Mode A: Host (kubectl) mode
@@ -89,7 +89,7 @@ if [[ -n "$NS" && -n "$POD" ]]; then
8989 fi
9090
9191 # Build dovecot-sysreport command
92- DS_CMD=" dovecot-sysreport"
92+ DS_CMD=" dovecot-sysreport -d /tmp/dovecot-sysreport- $( uname -n ) - $( date + ' %s ' ) .tar.gz "
9393 if [[ -n " $CORE_IN_POD_PATH " ]]; then
9494 DS_CMD=" $DS_CMD --core $CORE_IN_POD_PATH "
9595 fi
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ cat > "$MOCKROOT/bin/dovecot-sysreport" <<'EOF'
2222#!/usr/bin/env bash
2323# Creates a tarball under /tmp to simulate real dovecot-sysreport output
2424STAMP="$(date -u +%Y%m%dT%H%M%SZ)"
25- OUT="/tmp/ dovecot-sysreport-${STAMP}.tar.gz"
25+ OUT="dovecot-sysreport-${STAMP}.tar.gz"
2626TMPD="$(mktemp -d)"
2727echo "mock dovecot report" > "$TMPD/report.txt"
2828tar -czf "$OUT" -C "$TMPD" report.txt
You can’t perform that action at this time.
0 commit comments