1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-13 03:03:15 +00:00
freebsd-ports/net-p2p/torrentflux/files/pkg-deinstall.in
Oliver Eikemeier cbf3b9754b Add port net/torrentflux, a PHP based BitTorrent client that runs on a web server.
Unfortunately some manual configuration is necessary, so set NO_PACKAGE
(which is probably a dumb idea). Feel free to fix this.

While I'm here, sort CVSROOT-ports/modules.
2005-10-20 18:37:56 +00:00

30 lines
543 B
Bash

#!/bin/sh -e
#
# $FreeBSD$
#
CAT=/bin/cat
ECHO_CMD=echo
MD5=/sbin/md5
RM=/bin/rm
RMDIR=/bin/rmdir
TRUE=/usr/bin/true
case $2 in
DEINSTALL)
if [ -r "%%DATABASE%%/tf.md5" ]; then
saved=`${CAT} "%%DATABASE%%/tf.md5"`
calc=`${MD5} -q "%%DATABASE%%/tf.db"`
if [ "x$saved" = "x$calc" ]; then
${RM} -Rf "%%DATABASE%%"
${ECHO_CMD}
${ECHO_CMD} "===> Deleted TorrentFlux database."
${ECHO_CMD}
else
${RM} -f "%%DATABASE%%/tf.md5"
fi
fi
${RMDIR} "%%DOWNLOADS%%" 2>/dev/null || ${TRUE}
;;
esac