From: Zeljko Boros Date: Mon, 22 Mar 2021 10:31:52 +0000 (+0100) Subject: fix postinst with new function X-Git-Tag: debian/20210226+cn9u3~1 X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=commitdiff_plain;h=f5c291366761e8f560f3dc30e65bdf4c2931d807;p=bacula-cn.git fix postinst with new function --- 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