aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/bacula/pkg-deinstall
diff options
context:
space:
mode:
authorlkoeller <lkoeller@FreeBSD.org>2004-01-13 03:56:23 +0800
committerlkoeller <lkoeller@FreeBSD.org>2004-01-13 03:56:23 +0800
commitbced44b7edc1ad5fe6c58dfcfe9262848702fc57 (patch)
treef3945f545d9af57a0d76f8d63c67f2de58f056d3 /sysutils/bacula/pkg-deinstall
parent6eaa2c7df1dd64fa6b4ace3400e597be0e3549c8 (diff)
downloadfreebsd-ports-gnome-bced44b7edc1ad5fe6c58dfcfe9262848702fc57.tar.gz
freebsd-ports-gnome-bced44b7edc1ad5fe6c58dfcfe9262848702fc57.tar.zst
freebsd-ports-gnome-bced44b7edc1ad5fe6c58dfcfe9262848702fc57.zip
o) Fix a bug concerning the creation of /var/db/bacula and chmod
in pkg-install in pre-install phase (wrong order). o) Add/delete lines for file, storage and director ports in /etc/services o) Add bacula patches concerning EOM handling, choosing the next volume, and calculating weekofmonth
Diffstat (limited to 'sysutils/bacula/pkg-deinstall')
-rw-r--r--sysutils/bacula/pkg-deinstall26
1 files changed, 26 insertions, 0 deletions
diff --git a/sysutils/bacula/pkg-deinstall b/sysutils/bacula/pkg-deinstall
new file mode 100644
index 000000000000..28189213142e
--- /dev/null
+++ b/sysutils/bacula/pkg-deinstall
@@ -0,0 +1,26 @@
+#!/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
+
+ # Note how to delete UID/GID
+ USER=bacula
+ GROUP=${USER}
+ if pw usershow "${USER}" 2>/dev/null 1>&2; then
+ echo "To delete Bacula user permanently, use 'pw userdel ${USER}'"
+ echo "To delete Bacula group permanently, use 'pw groupdel ${GROUP}'"
+ echo "Check if ${BACULA_DIR} is empty and delete it to permanently remove the port"
+ fi
+ ;;
+esac