X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian%2Fcommon;h=f5ec8ae630ae8a42696c7e5d158c5db2c2607ac0;hb=82d91949a1cd5c844225265e484f121a40ffe566;hp=f611c19e55b22dffe4ee5f60cdeee3805819d889;hpb=e8cd8223b1ba10c8b7231fb4f3e0f0c7049c30fe;p=dak.git diff --git a/config/debian/common b/config/debian/common index f611c19e..f5ec8ae6 100644 --- a/config/debian/common +++ b/config/debian/common @@ -104,3 +104,9 @@ function reports() { dak cruft-report -s experimental >> $webdir/cruft-report-daily.txt cat $webdir/cruft-report-daily.txt | mail -a "X-Debian: DAK" -e -s "Debian archive cruft report for $(date +%D)" ftpmaster@ftp-master.debian.org -- -F "Debian FTP Masters" -f ftpmaster@ftp-master.debian.org } + +function pg_timestamp() { + tsname=${1:-"unknown"} + log "Saving postgres transaction id for ${tsname}" + psql -tAc 'select txid_current();' > $base/backup/txid_${tsname}_$(date +%Y.%m.%d-%H:%M:%S) +}