diff options
Diffstat (limited to 'bareos/PKGBUILD')
-rw-r--r-- | bareos/PKGBUILD | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/bareos/PKGBUILD b/bareos/PKGBUILD index 0f2507e0..b0184e5d 100644 --- a/bareos/PKGBUILD +++ b/bareos/PKGBUILD @@ -22,7 +22,7 @@ pkgname=("${pkgbase}-common" "${pkgbase}-storage-python-plugin") pkgver=19.2.6 -pkgrel=7 +pkgrel=8 arch=(x86_64 i686 pentium4 armv6h armv7h aarch64) groups=('bareos') pkgdesc="Bareos - Backup Archiving REcovery Open Sourced" @@ -97,10 +97,20 @@ build() { make DESTDIR="$srcdir/install" install # Currently upstream systemd file does not automatically create run directory - sed -i '/\[Service\]/a RuntimeDirectory=bareos' \ - "$srcdir/bareos-Release-$pkgver/core/platforms/systemd/bareos-dir.service" \ - "$srcdir/bareos-Release-$pkgver/core/platforms/systemd/bareos-fd.service" \ - "$srcdir/bareos-Release-$pkgver/core/platforms/systemd/bareos-sd.service" + for _daemon in 'dir' 'fd' 'sd'; do + sed -i ' + /\[Service\]/a RuntimeDirectory=bareos/'"${_daemon}"' + s@^\(WorkingDirectory=\).*$@/\1/run/bareos/'"${_daemon}"'@ + s@^\(PIDFile=\).*/\([^/]\+\)$@/\1/run/bareos/'"${_daemon}"'/\2@ + ' "$srcdir/bareos-Release-$pkgver/core/platforms/systemd/bareos-${_daemon}.service" + done + + sed -i '1 a PID Directory = /run/bareos/dir' \ + "$srcdir/install/usr/share/bareos/config/bareos-dir.d/director/bareos-dir.conf" + sed -i '1 a PID Directory = /run/bareos/sd' \ + "$srcdir/install/usr/share/bareos/config/bareos-sd.d/storage/bareos-sd.conf" + sed -i '1 a PID Directory = /run/bareos/fd' \ + "$srcdir/install/usr/share/bareos/config/bareos-fd.d/client/myself.conf" } package_bareos-common() { |