#!/bin/sh set -e DIR_DATA="/var/lib/gnuboat/" DIR_LOG="/var/log/gnuboat/" DIR_SPOOL="/var/spool/gnuboat" rm -R "${DIR_SPOOL}" if [ "$(ls -A ${DIR_DATA})" ]; then # do not remove the data directory echo "Your data directory (${DIR_DATA}) is not empty. Leaving the data directory untouched!" else rm -R "${DIR_DATA}" fi if [ "$(ls -A ${DIR_LOG})" ]; then # do not remove the data directory echo "Your log directory (${DIR_LOG}) is not empty. Leaving the log directory untouched!" else rm -R "${DIR_LOG}" fi #DEBHELPER# exit 0