3 BACULACRT=/etc/bacula/bacula-fd.pem
4 DAYS=$(expr 30 \* 86400)
6 if [ ! -f $BACULACRT ]; then
7 mailx -s "BACULA: Ne mogu otvoriti datoteku $BACULACRT!" -a 'Content-Type: text/plain; charset="utf-8"' root <<EOF
9 Datoteka $BACULACRT nije dostupna ili je korisnik 'bacula' ne može otvoriti!
11 Molimo provjerite status certifikata i po potrebi ga osvježite po uputama na adresi:
13 https://sysportal.carnet.hr/node/834
21 SSL=$(openssl x509 -checkend $DAYS -in $BACULACRT)
24 mailx -s "BACULA: Certifikat za Baculu zahtijeva PROVJERU!" -a 'Content-Type: text/plain; charset="utf-8"' root <<EOF
26 Valjanost certifikata za Baculu je istekla ili će isteći na dan: $(date --date="$(openssl x509 -in $BACULACRT -noout -enddate | cut -d= -f 2)" --iso-8601)
28 Certifikat obnovite po uputama na https://sysportal.carnet.hr/node/834