opnsense-ports/security/tripwire/files/pkg-deinstall.in
Franco Fichtner 8cb1a96ede ports: pull in a snapshot of the FreeBSD ports tree
Taken from:	https://github.com/freebsd/freebsd-ports.git
Commit id:	5070672073b68be364139bc6b3a89100bd17d331
2014-11-09 14:03:21 +01:00

30 lines
556 B
Bash

#! /bin/sh
case $2 in
POST-DEINSTALL)
if [ -n "${PACKAGE_BUILDING}" ]; then
return 0
fi
if [ -d %%TWCFG%% -o -d %%TWDB%% ]; then
unset ANS
echo
while [ -z "$ANS" ]; do
echo If permanently deleting this package,
echo %%TWCFG%% and %%TWDB%% may be removed.
echo Do you wish to delete %%TWCFG%%
echo -n and %%TWDB%%? '(yes/no) -: '
read ANS
case $ANS in
[Yy]|[Yy][Ee][Ss])
rm -rf %%TWCFG%% %%TWDB%%
;;
[Nn]|[Nn][Oo])
;;
*) echo Answer must be yes or no.
echo
unset ANS
;;
esac
done
fi
esac