1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-21 20:38:45 +00:00
freebsd-ports/sysutils/bacula2-server/pkg-deinstall.client
Wesley Shields 6ab390b54b - Reintroduce bacula2.x as sysutils/bacula2-server and sysutils/bacula2-client
- The 3.x line of bacula does not work with 2.x so these ports exist for
  those who can not upgrade to 3.x. Besides security/infrastructure fixes
  this port is not likely to see any functional upgrades.
- The bacula-*-devel ports will be updated to a 3.1 release when it
  is available.

PR:		ports/135580
Submitted by:	Vaclav Haisman <v.haisman@sh.cvut.cz>
Approved by:	dvl (old maintainer)
Thanks to:	miwi for build-testing
2009-06-15 18:17:17 +00:00

32 lines
758 B
Bash

#!/bin/sh
PATH=/bin:/usr/bin:/usr/sbin
TMPFILE=/tmp/services-$RANDOM-$$
if [ -z "${BACULA_DIR}" ]; then
BACULA_DIR=/var/db/bacula
fi
case "$2" in
"DEINSTALL")
# Delete entries in /etc/services
sed -e '/# Bacula port start/,/# Bacule port end/{' \
-e 'd' \
-e '}' /etc/services > $TMPFILE
mv -f $TMPFILE /etc/services
if [ -d ${BACULA_DIR} ]; then
rmdir ${BACULA_DIR};
fi
if [ -d ${BACULA_DIR} ]; then
echo "Check if ${BACULA_DIR} is empty and delete it to permanently remove the bacula port"
fi
# Note how to delete UID/GID
USER=bacula
GROUP=${USER}
if pw groupshow "${USER}" 2>/dev/null 1>&2; then
echo "To delete Bacula group permanently, use 'pw groupdel ${GROUP}'"
fi
;;
esac