#!/bin/bash
if [ -f "/usr/bin/borgmatic" ]; then
  echo '<<<psc_cron>>>'
  BMCMD="$(docker logs psc_cron_1 --tail=10 | grep -m1 -P '\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d' -o | head -1)"
  if [ $? -eq 0 ]; then
    D=$(date -d "$BMCMD" "+%s")
    echo "$D"
  else
    echo "0"
  fi
fi
