From f5c291366761e8f560f3dc30e65bdf4c2931d807 Mon Sep 17 00:00:00 2001 From: Zeljko Boros Date: Mon, 22 Mar 2021 11:31:52 +0100 Subject: [PATCH] fix postinst with new function --- debian/postinst | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/debian/postinst b/debian/postinst index a3d4150..693c254 100644 --- a/debian/postinst +++ b/debian/postinst @@ -258,17 +258,20 @@ EOF # cleanup rm -f $DF_FILE $DB_FILE $FD_FILE $PEM_FILE - ### fix privileges - chown root:bacula /etc/bacula/bacula-fd.pem /etc/bacula/bacula-fd.conf /etc/bacula/bconsole.conf - chmod 640 /etc/bacula/bacula-fd.pem /etc/bacula/bacula-fd.conf /etc/bacula/bconsole.conf - - # report problems + # report problems if [ ! -e $REQUEST_FILE ]; then db_input high bacula-cn/request-failed || true db_go || true fi } - + +fix_privileges() { + # fix privileges + + chown root:bacula /etc/bacula/bacula-fd.pem /etc/bacula/bacula-fd.conf /etc/bacula/bconsole.conf + chmod 640 /etc/bacula/bacula-fd.pem /etc/bacula/bacula-fd.conf /etc/bacula/bconsole.conf +} + load_config() { db_get bacula-cn/hostname HOST=$RET @@ -298,6 +301,8 @@ case "$1" in generate_fd_config generate_bconsole_config + fix_privileges + restart_bacula send_request -- 1.7.10.4