From a629034858292de78bd7f037c9e6ce89f5ee50f4 Mon Sep 17 00:00:00 2001 From: Zeljko Boros Date: Wed, 17 Mar 2021 13:07:46 +0100 Subject: [PATCH] -r umjesto -f u skripti, chown i chmod u /etc/bacula --- bacula-check-cert | 2 +- bacula-cn | 2 +- debian/postinst | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bacula-check-cert b/bacula-check-cert index 2dc908c..3ada58c 100755 --- a/bacula-check-cert +++ b/bacula-check-cert @@ -3,7 +3,7 @@ BACULACRT=/etc/bacula/bacula-fd.pem DAYS=$(expr 30 \* 86400) -if [ ! -f $BACULACRT ]; then +if [ ! -r $BACULACRT ]; then mailx -s "BACULA: Ne mogu otvoriti datoteku $BACULACRT!" -a 'Content-Type: text/plain; charset="utf-8"' root < /dev/null 2>&1 +30 08 * * * bacula /usr/sbin/bacula-check-cert > /dev/null 2>&1 diff --git a/debian/postinst b/debian/postinst index 4ca4ab5..a3d4150 100644 --- a/debian/postinst +++ b/debian/postinst @@ -258,6 +258,10 @@ 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 if [ ! -e $REQUEST_FILE ]; then db_input high bacula-cn/request-failed || true -- 1.7.10.4