4492f0b3af
designed to be used by one person or a small group of people. PR: ports/75554 Submitted by: Frank Behrens <frank@pinky.sax.de>
36 lines
880 B
Bash
36 lines
880 B
Bash
#!/bin/sh
|
|
|
|
|
|
if [ "$2" != "POST-DEINSTALL" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
POLIPOUSER=%%USER%%
|
|
POLIPOGROUP=%%GROUP%%
|
|
|
|
PCONFIGDIR=%%PCONFIGDIR%%
|
|
PPIDDIR=%%PPIDDIR%%
|
|
POLIPOCACHE=%%PCACHEDIR%%
|
|
POLIPOLOG=%%PLOGFILE%%
|
|
POLIPOPID=%%PPIDFILE%%
|
|
POLIPODATA=%%DATADIR%%
|
|
|
|
|
|
if pw usershow "${POLIPOUSER}" 2>/dev/null 1>&2; then
|
|
echo "---> To delete ${POLIPOUSER} user permanently, use 'pw userdel \"${POLIPOUSER}\"'"
|
|
fi
|
|
|
|
if [ -d "$POLIPOCACHE" ]; then
|
|
rm -r "$POLIPOCACHE" || exit 1
|
|
fi
|
|
if [ -d "$PPIDDIR" ]; then
|
|
rm -r "$PPIDDIR" || exit 1
|
|
fi
|
|
|
|
if fgrep "${POLIPOLOG}" "/etc/newsyslog.conf" 2>/dev/null 1>&2; then
|
|
echo "---> You should remove from /etc/newsyslog.conf the \"${POLIPOLOG}\" entry manually."
|
|
fi
|
|
|
|
rmdir $POLIPODATA/www/doc $POLIPODATA/www $POLIPODATA 2>/dev/null
|
|
rmdir $PCONFIGDIR 2>/dev/null || echo "---> If you not plan to reinstall polipo, you can safely remove ${PCONFIGDIR}."
|
|
exit 0
|