#!/bin/sh

NAME=rich-core-enable
DIR_MY_DOCS=/home/user/MyDocs
DIR_CORE_DUMPS=$DIR_MY_DOCS/core-dumps

if [ ! -d $DIR_MY_DOCS ]
then
	echo "$NAME - Directory doesn't exist - $DIR_MY_DOCS"
	echo "$NAME - Rich core dumping will not be enabled"
	echo "$NAME - Exiting"
	exit 0
fi

if [ ! -d $DIR_CORE_DUMPS ]
then
	echo "$NAME - Creating directory - $DIR_CORE_DUMPS"
	mkdir -p $DIR_CORE_DUMPS
fi
echo "$NAME - Rich core dumping enabled"
