#!/bin/bash
# Clean previous core dumps
# TT#76702 Copy of the step for mr3.8, but using /ngcp-data/coredumps instead of /var/cores

set -e

COREDUMPS_DIR="/ngcp-data/coredumps"

if [[ -d "${COREDUMPS_DIR}" ]]; then
  echo "Removing old core files from: ${COREDUMPS_DIR}"
  rm -rf "${COREDUMPS_DIR:?}"/*
fi
