X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=debian%2Fpostinst;h=91a8f1c105f345eed8f05288adbeb38977f1c9e8;hb=HEAD;hp=d0f161d8582c99ba610fadca45191aee8679ed1f;hpb=b5e4cb91d48b27bc0c0c750fd4622a063ffe1946;p=bacula-cn.git diff --git a/debian/postinst b/debian/postinst index d0f161d..0ac5c7e 100644 --- a/debian/postinst +++ b/debian/postinst @@ -52,7 +52,7 @@ Director { # directors to verify the authenticity of this file daemon TLS Certificate = "/etc/bacula/bacula-fd.pem" TLS Key = "/etc/bacula/bacula-fd.pem" - TLS DH File = "/etc/bacula/dh1024.pem" + TLS DH File = "/etc/bacula/dh2048.pem" } # @@ -131,7 +131,7 @@ EOF } generate_dh() { - DH_FILE=/etc/bacula/dh1024.pem + DH_FILE=/etc/bacula/dh2048.pem if [ -s $DH_FILE ]; then echo $DH_FILE already exists, skipping. @@ -139,7 +139,9 @@ generate_dh() { umask 077 echo Generating $DH_FILE - openssl dhparam -out $DH_FILE -5 1024 + ###openssl dhparam -out $DH_FILE -5 1024 + openssl dhparam -out $DH_FILE -2 2048 + fi } @@ -256,12 +258,44 @@ EOF # cleanup rm -f $DF_FILE $DB_FILE $FD_FILE $PEM_FILE - # 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 +} + +set_pinning() { + # set pin to version from stretch, because bacula 9.* isn't compatible + + PINFILE=/etc/apt/preferences.d/99-carnet + + test -f $PINFILE || touch $PINFILE + + cp-update bacula-cn $PINFILE <