aboutsummaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorJose Alonso Cardenas Marquez <acm@FreeBSD.org>2016-11-21 20:59:10 +0000
committerJose Alonso Cardenas Marquez <acm@FreeBSD.org>2016-11-21 20:59:10 +0000
commit906b2065e82e8ee36b9f0848f482a0bb44b0c95f (patch)
tree70fa72e6597ca38b073d407d0c406c03e86ea2c6 /sysutils
parent61f6fb1d04bf9564a65f3a4ed20cfcc2c27143e3 (diff)
downloadports-906b2065e82e8ee36b9f0848f482a0bb44b0c95f.tar.gz
ports-906b2065e82e8ee36b9f0848f482a0bb44b0c95f.zip
Notes
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/bareos-client-static/Makefile2
-rw-r--r--sysutils/bareos-client/Makefile2
-rw-r--r--sysutils/bareos-server/Makefile2
-rw-r--r--sysutils/bareos-server/files/bareos-dir.in4
-rw-r--r--sysutils/bareos-server/files/bareos-fd.in13
-rw-r--r--sysutils/bareos-server/files/bareos-sd.in6
6 files changed, 25 insertions, 4 deletions
diff --git a/sysutils/bareos-client-static/Makefile b/sysutils/bareos-client-static/Makefile
index e9acaa67096e..e51d335172b5 100644
--- a/sysutils/bareos-client-static/Makefile
+++ b/sysutils/bareos-client-static/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= bareos
-PORTREVISION= 0
+PORTREVISION= 1
PKGNAMESUFFIX= -client-static
COMMENT= Backup archiving recovery open sourced (static client)
diff --git a/sysutils/bareos-client/Makefile b/sysutils/bareos-client/Makefile
index f933f74db6c6..cc2f1a19c8a6 100644
--- a/sysutils/bareos-client/Makefile
+++ b/sysutils/bareos-client/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= bareos
-PORTREVISION= 0
+PORTREVISION= 1
PKGNAMESUFFIX= -client
COMMENT= Backup archiving recovery open sourced (client)
diff --git a/sysutils/bareos-server/Makefile b/sysutils/bareos-server/Makefile
index 64ab9154a150..7c081475e501 100644
--- a/sysutils/bareos-server/Makefile
+++ b/sysutils/bareos-server/Makefile
@@ -4,7 +4,7 @@
PORTNAME= bareos
DISTVERSIONPREFIX= Release/
DISTVERSION= 16.2.4
-#PORTREVISION?= 0
+PORTREVISION?= 1
CATEGORIES?= sysutils
PKGNAMEPREFIX?= #
PKGNAMESUFFIX?= -server
diff --git a/sysutils/bareos-server/files/bareos-dir.in b/sysutils/bareos-server/files/bareos-dir.in
index 3c5f23dd894e..a71d3a5c4e54 100644
--- a/sysutils/bareos-server/files/bareos-dir.in
+++ b/sysutils/bareos-server/files/bareos-dir.in
@@ -39,4 +39,8 @@ bareos_dir_testconfig()
eval ${command} ${bareos_dir_flags} -t
}
+start_precmd() {
+ [ -d "${pidfile%/*}" ] || install -d -o bareos -g bareos ${pidfile%/*}
+}
+
run_rc_command "$1"
diff --git a/sysutils/bareos-server/files/bareos-fd.in b/sysutils/bareos-server/files/bareos-fd.in
index bfa75cf6d6cc..5bd056d48991 100644
--- a/sysutils/bareos-server/files/bareos-fd.in
+++ b/sysutils/bareos-server/files/bareos-fd.in
@@ -31,4 +31,17 @@ command=%%PREFIX%%/sbin/bareos-fd
command_args="-c ${bareos_fd_config}"
pidfile="${bareos_fd_pidfile}"
+start_precmd() {
+ [ -d "${pidfile%/*}" ] || {
+ getent passwd bareos > /dev/null 2&>1
+ if [ $? -eq 0] ; then
+ # user bareos exists
+ install -d -o bareos -g bareos ${pidfile%/*}
+ else
+ # bareos_fd as solitair service
+ install -d -o root -g wheel ${pidfile%/*}
+ fi
+ }
+}
+
run_rc_command "$1"
diff --git a/sysutils/bareos-server/files/bareos-sd.in b/sysutils/bareos-server/files/bareos-sd.in
index 59bd2aa35c3d..6724f4fb5228 100644
--- a/sysutils/bareos-server/files/bareos-sd.in
+++ b/sysutils/bareos-server/files/bareos-sd.in
@@ -29,6 +29,10 @@ load_rc_config $name
command=%%PREFIX%%/sbin/bareos-sd
command_args="-c ${bareos_sd_config}"
-pidfile="${bacula_sd_pidfile}"
+pidfile="${bareos_sd_pidfile}"
+
+start_precmd() {
+ [ -d "${pidfile%/*}" ] || install -d -o bareos -g bareos ${pidfile%/*}
+}
run_rc_command "$1"