#!/bin/sh
# $FreeBSD: ports/net/smokeping/pkg-deinstall,v 1.2 2002/04/01 13:47:18 kuriyama Exp $
#

if [ -f ${PKG_PREFIX}/var/smokeping/smokeping.pid ]; then
    if [ -x ${PKG_PREFIX}/etc/rc.d/smokeping.sh ]; then
        ${PKG_PREFIX}/etc/rc.d/smokeping.sh stop > /dev/null
    fi
    rm ${PKG_PREFIX}/var/smokeping/smokeping.pid
fi

if [ "$2" != "POST-DEINSTALL" ]; then
    exit 0
fi

if [ -d ${PKG_PREFIX}/smokeping ]; then
    echo "----------------------------------------------------------------"
    echo "To delete your custom SmokePing configuration and all collected"
    echo "data permanently, use 'rm -R ${PKG_PREFIX}/smokeping'"
    echo "----------------------------------------------------------------"
fi

exit 0
