From 05a28605467fa8123b22247d25bda0325f9e93ca Mon Sep 17 00:00:00 2001 From: Zeljko Boros Date: Thu, 11 Mar 2021 15:33:27 +0100 Subject: [PATCH] Ispravke skripte --- bacula-check-cert | 28 ++++++++++++++++++++++------ bacula-cn | 2 +- debian/changelog | 6 ++++++ debian/control | 2 +- debian/install | 2 ++ 5 files changed, 32 insertions(+), 8 deletions(-) diff --git a/bacula-check-cert b/bacula-check-cert index 9ea91ef..e740445 100755 --- a/bacula-check-cert +++ b/bacula-check-cert @@ -1,17 +1,33 @@ #!/bin/bash -BACULACRT=/etc/bacula/bacula-fd.pem.old +BACULACRT=/etc/bacula/bacula-fd.pem +DAYS=$(expr 30 \* 86400) -test -f $BACULACRT || echo "Ne mogu otvoriti datoteku $BACULACRT!" +if [ ! -f $BACULACRT ]; then + mailx -s "BACULA: Ne mogu otvoriti datoteku $BACULACRT!" root <&1 | mail -s "Valjanost certifikata za Baculu JE ISTEKLA!" root +30 15 * * * bacula /usr/sbin/bacula-check-cert > /dev/null 2>&1 diff --git a/debian/changelog b/debian/changelog index 2bfa97a..4365b2e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +bacula-cn (20210226+cn9u2) unstable; urgency=medium + + * Dodan cronjob i skripta koji obavještava o isteklom lokalnom certifikatu + + -- Zeljko Boros Wed, 10 Mar 2021 18:45:05 +0100 + bacula-cn (20210226+cn9u1) unstable; urgency=medium * Ovisi o inačici bacule <= 7.4.4 diff --git a/debian/control b/debian/control index 911195c..9616b39 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Vcs-Browser: http://ftp.carnet.hr/carnet-debian/scm/?p=bacula-cn.git;a=summary Package: bacula-cn Architecture: all Depends: bacula-fd (<= 7.4.4+dfsg-6+deb9u2), bacula-console (<= 7.4.4+dfsg-6+deb9u2), openssl, curl, - ca-certificates, debconf (>= 0.5) | debconf-2.0, ${misc:Depends} + ca-certificates, debconf (>= 0.5) | debconf-2.0, bsd-mailx, ${misc:Depends} Suggests: default-mysql-client, postgresql-client-common, mail-transport-agent Description: Mrežno rješenje za backup poslužitelja CARNET-ovih članica Paket sadržava klijenta za sustav za backup 'Bacula', kojeg konfigurira diff --git a/debian/install b/debian/install index cfc38bb..1ff490c 100644 --- a/debian/install +++ b/debian/install @@ -1,2 +1,4 @@ sysbackup.pem etc/bacula/ db-dump etc/bacula/run-before-job.d/ +bacula-check-cert usr/sbin/ +bacula-cn etc/cron.d -- 1.7.10.4