From: Zeljko Boros Date: Wed, 17 Mar 2021 12:07:46 +0000 (+0100) Subject: -r umjesto -f u skripti, chown i chmod u /etc/bacula X-Git-Tag: debian/20210226+cn9u3~2 X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=commitdiff_plain;h=a629034858292de78bd7f037c9e6ce89f5ee50f4;p=bacula-cn.git -r umjesto -f u skripti, chown i chmod u /etc/bacula --- 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