#!/bin/bash
############################################
# cleanup-installer
#
# Removing the unpacked installer files
# Usage: ./cleanup-installer
#
# Copyright (c) 2016 Unify GmbH & Co. KG
# Demeter Aron, Kemenes Robert 
# aron.demeter.ext@unify.com, robert.kemenes.ext@unify.com
#
# Last modification: 11.04.2016
############################################

# Import definitions
CMD=$(basename $0)
if [ -f /opt/dtb/bin/_common_definitions ]; then
    . /opt/dtb/bin/_common_definitions
else
	logger -t $CMD -p ERROR -s "The /opt/dtb/bin/_common_definitions file does not exist, exiting the script..."
	exit 1
fi

# Remove unpacked installers recursive and forced:
plog "Removing unpacked installers from /var/opt/dtb/install..."
rm -rf $DTB_INSTALLDIR
plog "Removing unpacked installers complete."