aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/bareos-server
diff options
context:
space:
mode:
authoracm <acm@FreeBSD.org>2016-11-22 04:59:10 +0800
committeracm <acm@FreeBSD.org>2016-11-22 04:59:10 +0800
commit9788107dabfb609d09dbd6207623d4b67c078fe8 (patch)
tree70fa72e6597ca38b073d407d0c406c03e86ea2c6 /sysutils/bareos-server
parent68e9f73b4293d3fbbe085ecd4bef290d9e483296 (diff)
downloadfreebsd-ports-gnome-9788107dabfb609d09dbd6207623d4b67c078fe8.tar.gz
freebsd-ports-gnome-9788107dabfb609d09dbd6207623d4b67c078fe8.tar.zst
freebsd-ports-gnome-9788107dabfb609d09dbd6207623d4b67c078fe8.zip
- Fix start when /var/run is on TMPFS
- Bump PORTREVISION PR: 212282 Submitted by: O. Hartmann ohartmann (_at_) walstatt.org
Diffstat (limited to 'sysutils/bareos-server')
-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
4 files changed, 23 insertions, 2 deletions
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"