freebsd-ports/security/sancp/pkg-deinstall
Beech Rintoul 3a71621bb1 - Update to 1.6.1_2
- Minor fixes

PR:		ports/114390
Submitted by:	Paul Schmehl <pauls@utdallas.edu> (maintainer)
Approved by:	sat (mentor)
2007-07-14 22:21:13 +00:00

31 lines
583 B
Bash

#!/bin/sh
if [ "$2" != "POST-DEINSTALL" ]; then
exit 0
fi
PATH=/bin:/usr/sbin
USER=sancp
GROUP=${USER}
LOG_DIR=/var/log/sancp
# Remove the log directory
if [ -d ${LOG_DIR} ];
then
rmdir ${LOG_DIR} >/dev/null 2>&1;
fi
if pw user show "${USER}" >/dev/null 2>&1; then
if ! pw userdel ${USER} ;
then
echo "Unable to remove user: ${USER}, remove it manually"
fi
fi
if pw group show "${GROUP}" >/dev/null 2>&1; then
if ! pw groupdel ${GROUP} ;
then
echo "Unable to remove group: ${GROUP}, remove it manually"
fi
fi