## 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 -R bareos:bareos /etc/bareos

	/usr/lib/bareos/scripts/bareos-config initialize_database_driver
	/usr/lib/bareos/scripts/bareos-config apply_dbconfig_settings

	#for dir in /etc/bareos/bareos-dir-export/ /etc/bareos/bareos-dir-export/client; do
		#chown bareos:bareos "$dir"
		#chmod 750 "$dir"
	#done
}

post_upgrade() {
	post_install
}