diff options
author | Erich Eckner <git@eckner.net> | 2020-03-12 10:24:28 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-03-12 10:24:28 +0100 |
commit | e40d08b4d240fd5cd6bef819a9cfbb8940c30668 (patch) | |
tree | 03ab26b68a8ee3dc0b8d82029c0777a9cfb32c3f /bareos | |
parent | f33d1a19c0710421e17c44e5df47cf5d194007fa (diff) | |
download | archlinuxewe.git.save-e40d08b4d240fd5cd6bef819a9cfbb8940c30668.tar.xz |
bareos: use /run/bareos/* as working directories instead of /etc/bareos
Diffstat (limited to 'bareos')
-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() { |