aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/bacula2-server/Makefile4
-rw-r--r--sysutils/bacula2-server/pkg-deinstall.client6
-rw-r--r--sysutils/bacula2-server/pkg-deinstall.server7
-rw-r--r--sysutils/bacula2-server/pkg-install.client27
-rw-r--r--sysutils/bacula2-server/pkg-install.server46
5 files changed, 3 insertions, 87 deletions
diff --git a/sysutils/bacula2-server/Makefile b/sysutils/bacula2-server/Makefile
index db52dabf1066..e301d7388863 100644
--- a/sysutils/bacula2-server/Makefile
+++ b/sysutils/bacula2-server/Makefile
@@ -26,6 +26,9 @@ UNIQUENAME?= ${PORTNAME}${PKGNAMESUFFIX}
WRKSRC= ${WRKDIR}/bacula-${DISTVERSION}
+USERS= bacula
+GROUPS= ${USERS}
+
.if !defined(WITH_BAT)
.if !defined(WITH_CLIENT_ONLY)
USE_RC_SUBR?= bacula-dir bacula-sd
@@ -155,7 +158,6 @@ USE_MYSQL= yes
DBTYPE= mysql
SUB_LIST+= REQ_MYSQL=mysql REQ_PGSQL=""
.elif defined(WITH_POSTGRESQL)
-DEFAULT_PGSQL_VER?= 82
USE_PGSQL= yes
CONFIGURE_ARGS+= --with-postgresql=yes
DBTYPE= postgresql
diff --git a/sysutils/bacula2-server/pkg-deinstall.client b/sysutils/bacula2-server/pkg-deinstall.client
index 206ec9efca6b..4920be83b61e 100644
--- a/sysutils/bacula2-server/pkg-deinstall.client
+++ b/sysutils/bacula2-server/pkg-deinstall.client
@@ -21,11 +21,5 @@ case "$2" in
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
diff --git a/sysutils/bacula2-server/pkg-deinstall.server b/sysutils/bacula2-server/pkg-deinstall.server
index 3af061509188..4920be83b61e 100644
--- a/sysutils/bacula2-server/pkg-deinstall.server
+++ b/sysutils/bacula2-server/pkg-deinstall.server
@@ -21,12 +21,5 @@ case "$2" in
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 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
diff --git a/sysutils/bacula2-server/pkg-install.client b/sysutils/bacula2-server/pkg-install.client
index 656acca83733..b4f5939ed9d3 100644
--- a/sysutils/bacula2-server/pkg-install.client
+++ b/sysutils/bacula2-server/pkg-install.client
@@ -14,30 +14,3 @@ 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
diff --git a/sysutils/bacula2-server/pkg-install.server b/sysutils/bacula2-server/pkg-install.server
index 1dc3d8613ada..b4f5939ed9d3 100644
--- a/sysutils/bacula2-server/pkg-install.server
+++ b/sysutils/bacula2-server/pkg-install.server
@@ -14,49 +14,3 @@ 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
-
- if pw user show "${USER}" 2>/dev/null; then
- echo "You already have a user \"${USER}\", so I will use it."
- if pw usermod ${USER} -d ${BACULA_DIR} -G operator
- then
- echo "Changed home directory of \"${USER}\" to \"${BACULA_DIR}\""
- else
- echo "Changing home directory of \"${USER}\" to \"${BACULA_DIR}\" failed..."
- exit 1
- fi
- else
- if pw useradd ${USER} -u ${UID} -g ${GROUP} -G operator -h - \
- -d ${BACULA_DIR} -s /sbin/nologin -c "Bacula Daemon"
- then
- echo "Added user \"${USER}\"."
- else
- echo "Adding user \"${USER}\" failed..."
- exit 1
- fi
- fi
- chown -R ${USER}:${GROUP} ${BACULA_DIR}
- ;;
-esac