#!/bin/sh

HAMACHI_DST=/opt/logmein-hamachi

if [ ! -x /usr/lib/lsb/install_initd ] ; then
	echo LogMeIn Hamachi2 needs lsb package;
	exit 1;
fi

echo Stopping LogMeIn Hamachi2 engine ..
/etc/init.d/logmein-hamachi stop

echo Removing LogMeIn Hamachi2 service ..
/usr/lib/lsb/remove_initd /etc/init.d/logmein-hamachi
rm -f /etc/init.d/logmein-hamachi
rm -rf /var/run/logmein-hamachi

echo Removing LogMeIn Hamachi2 symlink ..
rm /usr/bin/hamachi

echo Removing files from $HAMACHI_DST ..
rm -rf "$HAMACHI_DST"

echo LogMeIn Hamachi2 is removed.
