summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Spradling2015-11-15 01:14:04 -0500
committerMichael Spradling2015-11-15 23:40:10 -0500
commite78a364794d21740b231b157604b344e7da0953b (patch)
tree49ec458eeb1d2981ba56522994ad385d4808d80e
parentffde4bcde03eb40fe0738d47b081c26d18660362 (diff)
downloadaur-e78a364794d21740b231b157604b344e7da0953b.tar.gz
Add install scripts.
Processes now run as user bareos. etc files are backup
-rw-r--r--.SRCINFO36
-rw-r--r--PKGBUILD2
-rw-r--r--PKGBUILD.common144
-rw-r--r--bareos-bat.install8
-rw-r--r--bareos-bconsole.install8
-rw-r--r--bareos-common.install25
-rw-r--r--bareos-database-mysql.install20
-rw-r--r--bareos-database-postgresql.install20
-rw-r--r--bareos-director.install11
-rw-r--r--bareos-filedaemon.install8
-rw-r--r--bareos-storage-fifo.install4
-rw-r--r--bareos-storage-tape.install4
-rw-r--r--bareos-storage.install12
-rw-r--r--bareos-traymonitor.install8
14 files changed, 239 insertions, 71 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9ea6f248b25..f6b08fc2ea5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = bareos
pkgdesc = Bareos - Backup Archiving REcovery Open Sourced
pkgver = 15.2.1
- pkgrel = 1
+ pkgrel = 2
url = http://www.bareos.org
arch = i686
arch = x86_64
@@ -17,93 +17,117 @@ pkgbase = bareos
source = https://github.com/bareos/bareos/archive/Release/15.2.1.tar.gz
source = PKGBUILD.common
sha256sums = 020b974b54f10d245ee920dd3144827ef32588599e703e4f3ce1c913a0201160
- sha256sums = 4323ea77dc3c370c130d801887d871cdb2aed9f4f251ec63d85b6e80ca7c1f0e
+ sha256sums = 4720c3fcfd1593f7efef4d04e736f0d468fde742bdc5e1155140bcfa576df20e
pkgname = bareos-common
pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Common files
+ install = bareos-common.install
+ backup =
pkgname = bareos-bconsole
pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Admin Tool (CLI)
+ install = bareos-bconsole.install
groups = bareos
groups = bareos-client
depends = bareos-common=15.2.1
+ backup = '/etc/bareos/bconsole.conf'
pkgname = bareos-database-common
pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Generic abstration libs and tools for sql catalog
depends = bareos-common=15.2.1
+ depends = bareos-database-tools=15.2.1
+ backup =
pkgname = bareos-database-mysql
pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Libs and tools for mysql catalog
+ install = bareos-database-mysql.install
depends = bareos-database-common=15.2.1
depends = libmariadbclient
provides = bareos-database=15.2.1
+ backup =
pkgname = bareos-database-postgresql
pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Libs and tools for postgresql catalog
depends = bareos-database-common=15.2.1
depends = postgresql-libs
provides = bareos-database=15.2.1
+ backup =
pkgname = bareos-database-sqlite3
pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Libs and tools for sqlite3 catalog
depends = bareos-database-common=15.2.1
depends = sqlite3
provides = bareos-database=15.2.1
+ backup =
pkgname = bareos-database-tools
pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - CLI tools with database dpendencies (dbcheck, bscan)
- depends = bareos-database=15.2.1
+ backup =
pkgname = bareos-devel
pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Devel headers
+ backup =
pkgname = bareos-director
pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Director daemon
+ install = bareos-director.install
depends = bareos-common=15.2.1
- depends = bareos-database-common=15.2.1
- depends = bareos-database=15.2.1
- depends = bareos-database-tools=15.2.1
+ backup = '/etc/bareos/bareos-dir.conf'
+ backup = '/etc/logrotate.d/bareos-dir'
pkgname = bareos-storage-fifo
pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - FIFO support for storage daemon
+ install = bareos-storage-fifo.install
depends = bareos-storage=15.2.1
+ backup = '/etc/bareos/bareos-sd.d/device-fifo.conf'
pkgname = bareos-tools
pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - CLI tools (bcopy, bextract, bls, bregeq, bwild)
depends = bareos-common=15.2.1
+ backup =
pkgname = bareos-filedaemon
pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - File daemon
+ install = bareos-filedaemon.install
groups = bareos
groups = bareos-client
depends = bareos-common=15.2.1
+ backup = '/etc/bareos/bareos-fd.conf'
pkgname = bareos-storage
pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Storage daemon
+ install = bareos-storage.install
depends = bareos-common=15.2.1
optdepends = openssl: network encryption between daemons
optdepends = lzo2: LZO compression for Storage Daemon
+ backup = '/etc/bareos/bareos-sd.conf'
pkgname = bareos-storage-tape
pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Tape support for storage daemon
+ install = bareos-storage-tape.install
depends = bareos-storage=15.2.1
depends = mtx
+ backup = '/etc/bareos/bareos-sd.d/device-tape-with-autoloader.conf'
+ backup = '/etc/bareos/mtx-changer.conf'
pkgname = bareos-director-python-plugin
pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Python plugin for director daemon
depends = bareos-director=15.2.1
depends = python
depends = python2
+ backup =
pkgname = bareos-filedaemon-python-plugin
pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Python plugin for file daemon
depends = bareos-filedaemon=15.2.1
depends = python
depends = python2
+ backup =
pkgname = bareos-storage-python-plugin
pkgdesc = Bareos - Backup Archiving REcovery Open Sourced - Python plugin for storage daemon
depends = bareos-storage=15.2.1
depends = python
depends = python2
+ backup =
diff --git a/PKGBUILD b/PKGBUILD
index 82796580877..f2c14c205b5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -26,4 +26,4 @@ source=("https://github.com/bareos/bareos/archive/Release/${pkgver}.tar.gz"
"PKGBUILD.common")
sha256sums=('020b974b54f10d245ee920dd3144827ef32588599e703e4f3ce1c913a0201160'
- '4323ea77dc3c370c130d801887d871cdb2aed9f4f251ec63d85b6e80ca7c1f0e')
+ 'a76f47b2cdfaede8bba6f1c658afed999260bb267fe7cba48255ce1a73796b06')
diff --git a/PKGBUILD.common b/PKGBUILD.common
index f2fc77a2be7..9200ed25190 100644
--- a/PKGBUILD.common
+++ b/PKGBUILD.common
@@ -2,7 +2,7 @@
# Contributor: Daniel Albers <daniel@lbe.rs>
pkgver=15.2.1
-pkgrel=1
+pkgrel=2
arch=(i686 x86_64)
groups=('bareos')
pkgdesc="Bareos - Backup Archiving REcovery Open Sourced"
@@ -48,17 +48,13 @@ _configure_args="--prefix=/usr \
--with-python \
--enable-includes \
--disable-rpath \
- --with-systemd=/usr/lib/systemd/system"
-
- # Add in wrappers
- #--with-tcp-wrappers \
- # Add back in when i get users working
- #--with-dir-user=$(DIRECTOR_DAEMON_USER) \
- #--with-dir-group=$(DAEMON_GROUP) \
- #--with-sd-user=$(STORAGE_DAEMON_USER) \
- #--with-sd-group=$(STORAGE_DAEMON_GROUP) \
- #--with-fd-user=$(FILE_DAEMON_USER) \
- #--with-fd-group=$(DAEMON_GROUP) \
+ --with-systemd=/usr/lib/systemd/system \
+ --with-dir-user=bareos \
+ --with-dir-group=bareos \
+ --with-sd-user=bareos \
+ --with-sd-group=bareos \
+ --with-fd-user=bareos \
+ --with-fd-group=bareos"
prepare() {
# bareos must use python2
@@ -76,17 +72,23 @@ build() {
_install_files() {
pushd $_instdir &> /dev/null
+ # Create needed directories
+ if [ -e "${_pkgsrc}/debian/$1.dirs" ]; then
+ while read dir
+ do
+ mkdir -p ${pkgdir}${dir}
+ done < ${_pkgsrc}/debian/$1.dirs
+ fi
+
+ # Create files
while read file
do
+ set -f # Handle BLOB wild cards
file=$(echo $file | sed 's,\([^ ]*\).*,\1,g') # Remove second param, if exists
-
- #if [[ -e ${file#?} || -L ${file#?} || ${file#?} == *"*"* ]]; then
- cp --parents -a ${file#?} ${pkgdir}
- #else
- #warning "Source file ${file#?} does not exist"
- #fi
-
- done < ${_pkgsrc}/debian/$1
+ file=${file:1:${#file}-1}
+ set +f
+ cp --parents -a ${file} ${pkgdir}
+ done < ${_pkgsrc}/debian/$1.install
mv "${pkgdir}/usr/sbin" "${pkgdir}/usr/bin" &> /dev/null || true
@@ -96,91 +98,100 @@ _install_files() {
_etc_files() {
pushd $_instdir &> /dev/null
+ # HACK: This allows mksrcinfo to work when determining etc files dynamically
+ [[ ${_pkgsrc} == $(readlink -f $(pwd)/..)* ]] || MKSRCINFO=1
+ [[ $MKSRCINFO -eq 1 ]] && _pkgsrc=${_pkgsrc:1:${#_pkgsrc}-1}
+
while read file
do
file=$(echo $file | sed 's,\([^ ]*\).*,\1,g') # Remove second param, if exists
+ [[ $MKSRCINFO -ne 1 ]] && file=${file:1:${#file}-1}
if [[ "$file" =~ "/etc" ]]; then
- out="'${file#?}' $out"
+ out="'${file}' $out"
fi
done < ${_pkgsrc}/debian/$1
popd &> /dev/null
-
echo $out
}
+
package_bareos-bat() {
pkgdesc="${pkgdesc} - Admin Tool (GUI)"
depends=("bareos-common=$pkgver" "qt4")
makedepends+=('qt4')
- declare -a backup=(`_etc_files ${pkgname}.install`)
- _install_files ${pkgname}.install
+ backup=(`_etc_files ${pkgname}.install`)
+ install=bareos-bat.install
+ _install_files ${pkgname}
}
package_bareos-bconsole() {
pkgdesc="${pkgdesc} - Admin Tool (CLI)"
depends=("bareos-common=$pkgver")
groups+=('bareos-client')
- declare -a backup=(`_etc_files ${pkgname}.install`)
- _install_files ${pkgname}.install
+ backup=(`_etc_files ${pkgname}.install`)
+ install=bareos-bconsole.install
+ _install_files ${pkgname}
}
package_bareos-common() {
pkgdesc="${pkgdesc} - Common files"
- declare -a backup=(`_etc_files ${pkgname}.install`)
- _install_files ${pkgname}.install
+ backup=(`_etc_files ${pkgname}.install`)
+ install=bareos-common.install
+ _install_files ${pkgname}
}
package_bareos-database-common() {
pkgdesc="${pkgdesc} - Generic abstration libs and tools for sql catalog"
- depends=("bareos-common=$pkgver")
- declare -a backup=(`_etc_files ${pkgname}.install`)
- _install_files ${pkgname}.install
+ depends=("bareos-common=$pkgver" "bareos-database-tools=$pkgver")
+ backup=(`_etc_files ${pkgname}.install`)
+ _install_files ${pkgname}
}
package_bareos-database-mysql() {
pkgdesc="${pkgdesc} - Libs and tools for mysql catalog"
provides=("bareos-database=$pkgver")
depends=("bareos-database-common=$pkgver" "libmariadbclient")
- declare -a backup=(`_etc_files ${pkgname}.install`)
- _install_files ${pkgname}.install
+ backup=(`_etc_files ${pkgname}.install`)
+ install=bareos-database-mysql.install
+ _install_files ${pkgname}
}
package_bareos-database-postgresql() {
pkgdesc="${pkgdesc} - Libs and tools for postgresql catalog"
provides=("bareos-database=$pkgver")
depends=("bareos-database-common=$pkgver" "postgresql-libs")
- declare -a backup=(`_etc_files ${pkgname}.install`)
- _install_files ${pkgname}.install
+ backup=(`_etc_files ${pkgname}.install`)
+ _install_files ${pkgname}
}
package_bareos-database-sqlite3() {
pkgdesc="${pkgdesc} - Libs and tools for sqlite3 catalog"
provides=("bareos-database=$pkgver")
depends=("bareos-database-common=$pkgver" "sqlite3")
- declare -a backup=(`_etc_files ${pkgname}.install`)
- _install_files ${pkgname}.install
+ backup=(`_etc_files ${pkgname}.install`)
+ _install_files ${pkgname}
}
package_bareos-database-tools() {
-pkgdesc="${pkgdesc} - CLI tools with database dpendencies (dbcheck, bscan)"
- depends=("bareos-database=$pkgver")
- declare -a backup=(`_etc_files ${pkgname}.install`)
- _install_files ${pkgname}.install
+ pkgdesc="${pkgdesc} - CLI tools with database dpendencies (dbcheck, bscan)"
+ backup=(`_etc_files ${pkgname}.install`)
+ _install_files ${pkgname}
}
package_bareos-devel() {
pkgdesc="${pkgdesc} - Devel headers"
- declare -a backup=(`_etc_files ${pkgname}.install`)
- _install_files ${pkgname}.install
+ backup=(`_etc_files ${pkgname}.install`)
+ _install_files ${pkgname}
}
package_bareos-director() {
pkgdesc="${pkgdesc} - Director daemon"
- depends=("bareos-common=$pkgver" "bareos-database-common=$pkgver" "bareos-database=$pkgver" "bareos-database-tools=$pkgver")
- declare -a backup=(`_etc_files ${pkgname}.install`)
- _install_files ${pkgname}.install
+ depends=("bareos-common=$pkgver")
+ backup=(`_etc_files ${pkgname}.install`)
+ install=bareos-director.install
+ _install_files ${pkgname}
# Install systemd service
mkdir -p ${pkgdir}/usr/lib/systemd/system
@@ -190,16 +201,17 @@ package_bareos-director() {
package_bareos-director-python-plugin() {
pkgdesc="${pkgdesc} - Python plugin for director daemon"
depends=("bareos-director=$pkgver" "python" "python2")
- declare -a backup=(`_etc_files ${pkgname}.install`)
- _install_files ${pkgname}.install
+ backup=(`_etc_files ${pkgname}.install`)
+ _install_files ${pkgname}
}
package_bareos-filedaemon() {
pkgdesc="${pkgdesc} - File daemon"
depends=("bareos-common=$pkgver")
groups+=('bareos-client')
- declare -a backup=(`_etc_files ${pkgname}.install`)
- _install_files ${pkgname}.install
+ backup=(`_etc_files ${pkgname}.install`)
+ install=bareos-filedaemon.install
+ _install_files ${pkgname}
# Install systemd service
mkdir -p ${pkgdir}/usr/lib/systemd/system
@@ -209,16 +221,17 @@ package_bareos-filedaemon() {
package_bareos-filedaemon-python-plugin() {
pkgdesc="${pkgdesc} - Python plugin for file daemon"
depends=("bareos-filedaemon=$pkgver" "python" "python2")
- declare -a backup=(`_etc_files ${pkgname}.install`)
- _install_files ${pkgname}.install
+ backup=(`_etc_files ${pkgname}.install`)
+ _install_files ${pkgname}
}
package_bareos-storage() {
pkgdesc="${pkgdesc} - Storage daemon"
optdepends+=('lzo2: LZO compression for Storage Daemon')
depends=("bareos-common=$pkgver")
- declare -a backup=(`_etc_files ${pkgname}.install`)
- _install_files ${pkgname}.install
+ backup=(`_etc_files ${pkgname}.install`)
+ install=bareos-storage.install
+ _install_files ${pkgname}
# Install systemd service
mkdir -p ${pkgdir}/usr/lib/systemd/system
@@ -228,35 +241,38 @@ package_bareos-storage() {
package_bareos-storage-fifo() {
pkgdesc="${pkgdesc} - FIFO support for storage daemon"
depends=("bareos-storage=$pkgver")
- declare -a backup=(`_etc_files ${pkgname}.install`)
- _install_files ${pkgname}.install
+ backup=(`_etc_files ${pkgname}.install`)
+ install=bareos-storage-fifo.install
+ _install_files ${pkgname}
}
package_bareos-storage-python-plugin() {
pkgdesc="${pkgdesc} - Python plugin for storage daemon"
depends=("bareos-storage=$pkgver" "python" "python2")
- declare -a backup=(`_etc_files ${pkgname}.install`)
- _install_files ${pkgname}.install
+ backup=(`_etc_files ${pkgname}.install`)
+ _install_files ${pkgname}
}
package_bareos-storage-tape() {
pkgdesc="${pkgdesc} - Tape support for storage daemon"
depends=("bareos-storage=$pkgver" "mtx")
- declare -a backup=(`_etc_files ${pkgname}.install`)
- _install_files ${pkgname}.install
+ backup=(`_etc_files ${pkgname}.install`)
+ install=bareos-storage-tape.install
+ _install_files ${pkgname}
}
package_bareos-tools() {
pkgdesc="${pkgdesc} - CLI tools (bcopy, bextract, bls, bregeq, bwild)"
depends=("bareos-common=$pkgver")
- declare -a backup=(`_etc_files ${pkgname}.install`)
- _install_files ${pkgname}.install
+ backup=(`_etc_files ${pkgname}.install`)
+ _install_files ${pkgname}
}
package_bareos-traymonitor() {
pkgdesc="${pkgdesc} - Tray Monitor (QT)"
depends=("bareos-common=$pkgver" "qt4")
makedepends+=('qt4')
- declare -a backup=(`_etc_files ${pkgname}.install`)
- _install_files ${pkgname}.install
+ backup=(`_etc_files ${pkgname}.install`)
+ install=bareos-traymonitor.install
+ _install_files ${pkgname}
}
diff --git a/bareos-bat.install b/bareos-bat.install
new file mode 100644
index 00000000000..b98fc33402b
--- /dev/null
+++ b/bareos-bat.install
@@ -0,0 +1,8 @@
+## arg 1: the new package version
+post_install() {
+ /usr/lib/bareos/scripts/bareos-config initialize_local_hostname
+ /usr/lib/bareos/scripts/bareos-config initialize_passwords
+
+ chown root:bareos /etc/bareos/bat.conf
+ chmod 640 /etc/bareos/bat.conf
+}
diff --git a/bareos-bconsole.install b/bareos-bconsole.install
new file mode 100644
index 00000000000..ad7ebd49745
--- /dev/null
+++ b/bareos-bconsole.install
@@ -0,0 +1,8 @@
+## arg 1: the new package version
+post_install() {
+ /usr/lib/bareos/scripts/bareos-config initialize_local_hostname
+ /usr/lib/bareos/scripts/bareos-config initialize_passwords
+
+ chown root:bareos /etc/bareos/bconsole.conf
+ chmod 640 /etc/bareos/bconsole.conf
+}
diff --git a/bareos-common.install b/bareos-common.install
new file mode 100644
index 00000000000..4002a3aa572
--- /dev/null
+++ b/bareos-common.install
@@ -0,0 +1,25 @@
+# arg 1: the new package version
+pre_install() {
+ # Create User/Group
+ getent group bareos > /dev/null || groupadd --system bareos
+ getent passwd bareos > /dev/null || useradd --system --gid bareos \
+ --home-dir /var/lib/bareos --no-create-home bareos
+
+}
+
+# arg 1: the new package version
+post_install() {
+ chown bareos:bareos /var/lib/bareos/
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+pre_upgrade() {
+ pre_install
+}
+
+# arg 1: the old package version
+post_remove() {
+ getent passwd bareos > /dev/null && userdel bareos
+ rm -f /etc/bareos/.rndpwd
+}
diff --git a/bareos-database-mysql.install b/bareos-database-mysql.install
new file mode 100644
index 00000000000..60d95665dd5
--- /dev/null
+++ b/bareos-database-mysql.install
@@ -0,0 +1,20 @@
+yellow='\e[0;33m'
+coloroff='\e[0m'
+
+# arg 0: the new package version
+post_install() {
+ echo -e "${yellow}NOTE: Please see documentation (section 2.4.2) to setup database:${coloroff}"
+ echo -e "${yellow} http://doc.bareos.org/master/html/bareos-manual-main-reference.html#x1-400002.4.2${coloroff}"
+}
+
+# arg 0: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ echo -e "${yellow}NOTE: Please see documentation (section) 3.1.2 to update database${coloroff}"
+ echo -e "${yellow} http://doc.bareos.org/master/html/bareos-manual-main-reference.html#x1-450003.1.2${coloroff}"
+}
+
+# arg 0: the old package version
+post_remove() {
+ echo -e "${yellow}NOTE: To remove all traces of bareos please delete the bareos database.${coloroff}"
+}
diff --git a/bareos-database-postgresql.install b/bareos-database-postgresql.install
new file mode 100644
index 00000000000..6f44b41b532
--- /dev/null
+++ b/bareos-database-postgresql.install
@@ -0,0 +1,20 @@
+yellow='\e[0;33m'
+coloroff='\e[0m'
+
+# arg 0: the new package version
+post_install() {
+ echo -e "${yellow}NOTE: Please see documentation (section 2.4.2) to setup database:${coloroff}"
+ echo -e "${yellow} http://doc.bareos.org/master/html/bareos-manual-main-reference.html#x1-380002.4.2${coloroff}"
+}
+
+# arg 0: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ echo -e "${yellow}NOTE: Please see documentation (section) 3.1.2 to update database${coloroff}"
+ echo -e "${yellow} http://doc.bareos.org/master/html/bareos-manual-main-reference.html#x1-450003.1.2${coloroff}"
+}
+
+# arg 0: the old package version
+post_remove() {
+ echo -e "${yellow}NOTE: To remove all traces of bareos please delete the bareos database.${coloroff}"
+}
diff --git a/bareos-director.install b/bareos-director.install
new file mode 100644
index 00000000000..3c1c168c747
--- /dev/null
+++ b/bareos-director.install
@@ -0,0 +1,11 @@
+## arg 1: the new package version
+post_install() {
+ /usr/lib/bareos/scripts/bareos-config initialize_local_hostname
+ /usr/lib/bareos/scripts/bareos-config initialize_passwords
+ /usr/lib/bareos/scripts/bareos-config initialize_database_driver
+ /usr/lib/bareos/scripts/bareos-config apply_dbconfig_settings
+
+ chown root:bareos /etc/bareos/bareos-dir.d
+ chown root:bareos /etc/bareos/bareos-dir.conf
+ chmod 640 /etc/bareos/bareos-dir.conf
+}
diff --git a/bareos-filedaemon.install b/bareos-filedaemon.install
new file mode 100644
index 00000000000..60f03d6257c
--- /dev/null
+++ b/bareos-filedaemon.install
@@ -0,0 +1,8 @@
+## arg 1: the new package version
+post_install() {
+ /usr/lib/bareos/scripts/bareos-config initialize_local_hostname
+ /usr/lib/bareos/scripts/bareos-config initialize_passwords
+
+ chown root:bareos /etc/bareos/bareos-fd.conf
+ chmod 640 /etc/bareos/bareos-fd.conf
+}
diff --git a/bareos-storage-fifo.install b/bareos-storage-fifo.install
new file mode 100644
index 00000000000..23cce62348a
--- /dev/null
+++ b/bareos-storage-fifo.install
@@ -0,0 +1,4 @@
+## arg 1: the new package version
+post_install() {
+ chown root:bareos /etc/bareos/bareos-sd.d/device-fifo.conf
+}
diff --git a/bareos-storage-tape.install b/bareos-storage-tape.install
new file mode 100644
index 00000000000..f1e01622ffe
--- /dev/null
+++ b/bareos-storage-tape.install
@@ -0,0 +1,4 @@
+## arg 1: the new package version
+post_install() {
+ chown root:bareos /etc/bareos/bareos-sd.d/device-tape-with-autoloader.conf
+}
diff --git a/bareos-storage.install b/bareos-storage.install
new file mode 100644
index 00000000000..9ffd7d99feb
--- /dev/null
+++ b/bareos-storage.install
@@ -0,0 +1,12 @@
+## arg 1: the new package version
+post_install() {
+ /usr/lib/bareos/scripts/bareos-config initialize_local_hostname
+ /usr/lib/bareos/scripts/bareos-config initialize_passwords
+
+ chown root:bareos /etc/bareos/bareos-sd.conf
+ chown root:bareos /etc/bareos/bareos-sd.d
+ chown root:bareos /var/lib/bareos/storage/
+ chmod 640 /etc/bareos/bareos-sd.conf
+
+ /usr/lib/bareos/scripts/bareos-config setup_sd_user
+}
diff --git a/bareos-traymonitor.install b/bareos-traymonitor.install
new file mode 100644
index 00000000000..e4380d888c7
--- /dev/null
+++ b/bareos-traymonitor.install
@@ -0,0 +1,8 @@
+## arg 1: the new package version
+post_install() {
+ /usr/lib/bareos/scripts/bareos-config initialize_local_hostname
+ /usr/lib/bareos/scripts/bareos-config initialize_passwords
+
+ chown root:bareos /etc/bareos/tray-monitor.conf
+ chmod 640 /etc/bareos/tray-monitor.conf
+}