mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-26 05:02:18 +00:00
589580ab8f
- change OPTION for SSL from default "off" to "on" - move hard coded UID/GID from (de)install scripts to SUB_LIST - change default Database from SQLite to PostgreSQL - remove patch files/bacula-sd.conf.in which was never applied Starting with version 5.0.3 bacula builds per default with SSL support. This update includes fixes for PR 148715 and 148967 PR: 150263 Submitted by: ohauer Approved by: Dan Langille (maintainer), glarkin (mentor, implicit)
35 lines
849 B
Bash
35 lines
849 B
Bash
#!/bin/sh
|
|
|
|
PATH=/bin:/usr/bin:/usr/sbin
|
|
|
|
# Note how to delete UID/GID
|
|
USER=%%BACULA_USER%%
|
|
GROUP=%%BACULA_GROUP%%
|
|
UID=%%BACULA_UID%%
|
|
GID=%%BACULA_UID%%
|
|
BACULA_DIR=%%BACULA_DIR%%
|
|
|
|
TMPFILE=/tmp/services-$RANDOM-$$
|
|
|
|
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
|
|
|
|
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}'"
|
|
fi
|
|
;;
|
|
esac
|