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"