#!/bin/bash

set -e

if [ ! -d /usr/lib/diveboard ]; then
    echo "The plugin for Diveboard does not seem to be installed. Aborting uninstallation."
    exit 2
fi

if [ ! -w /usr/lib ]; then
    echo "You need to be root to uninstall the plugin"
    exit 1
fi


rm -fr /usr/lib/diveboard
rm -fr /usr/bin/DiveboardAgent

exit 0
 EOF
