mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-01 05:45:45 +00:00
401ceb58a1
has been released. Split the documentation into a new port, sysutils/bacula-docs. You must run the database upgrade script after upgrading to Bacula 2.0.0 Many new features here. See http://www.bacula.org/?page=presskits for an overview, and ReleaseNotes for full details. PR: ports/107535 Submitted by: Dan Langille (maintainer)
44 lines
885 B
Bash
44 lines
885 B
Bash
#!/bin/sh
|
|
|
|
PATH=/bin:/usr/bin:/usr/sbin
|
|
if [ -z "${BACULA_DIR}" ]; then
|
|
BACULA_DIR=/var/db/bacula
|
|
fi
|
|
|
|
# Always add lines in /etc/services
|
|
grep -q "bacula-dir" /etc/services
|
|
if [ "$?" != "0" ]; then
|
|
echo "# Bacula port start
|
|
bacula-dir 9101/tcp #Bacula director daemon
|
|
bacula-fd 9102/tcp #Bacula file daemon
|
|
bacula-sd 9103/tcp #Bacula storage daemon
|
|
# Bacule port end" >> /etc/services
|
|
fi
|
|
|
|
case $2 in
|
|
PRE-INSTALL)
|
|
# Install UID/GID
|
|
USER=bacula
|
|
GROUP=${USER}
|
|
UID=910
|
|
GID=${UID}
|
|
|
|
if [ ! -d ${BACULA_DIR} ]; then
|
|
mkdir -p ${BACULA_DIR}
|
|
fi
|
|
|
|
if pw group show "${GROUP}" 2>/dev/null; then
|
|
echo "You already have a group \"${GROUP}\", so I will use it."
|
|
else
|
|
if pw groupadd ${GROUP} -g ${GID}; then
|
|
echo "Added group \"${GROUP}\"."
|
|
else
|
|
echo "Adding group \"${GROUP}\" failed..."
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
chgrp -R ${GROUP} ${BACULA_DIR}
|
|
;;
|
|
esac
|