Fix Error. Update debian package index bevor installing packages.

This commit is contained in:
Christoph 2017-10-22 12:22:42 +02:00
parent ced2a28679
commit 3e5e0927f9

View File

@ -4,6 +4,7 @@
working_dir="$(dirname $(realpath $0))" working_dir="$(dirname $(realpath $0))"
conf_file="${working_dir}/conf//install_postfix_advanced.conf" conf_file="${working_dir}/conf//install_postfix_advanced.conf"
_TLS_CERT_DIR=/etc/postfix/ssl _TLS_CERT_DIR=/etc/postfix/ssl
_TLS_CERT_FILE="${_TLS_CERT_DIR}/mailserver.crt" _TLS_CERT_FILE="${_TLS_CERT_DIR}/mailserver.crt"
_TLS_KEY_FILE="${_TLS_CERT_DIR}/mailserver.key" _TLS_KEY_FILE="${_TLS_CERT_DIR}/mailserver.key"
@ -339,6 +340,7 @@ if $IS_RELAY_HOST ; then
cat << EOF >> $conf_file cat << EOF >> $conf_file
_SASL_AUTH_ENABLED=$SASL_AUTH_ENABLED _SASL_AUTH_ENABLED=$SASL_AUTH_ENABLED
EOF EOF
fi
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
_failed=true _failed=true
fi fi
@ -351,6 +353,18 @@ fi
[[ "$IPV6" = "disabled" ]] && IPV6="" [[ "$IPV6" = "disabled" ]] && IPV6=""
# - Synchronise package index files with the repository
# -
echononl " Synchronise package index files with the repository.."
apt-get update > error "$tmp_err_msg" 2>&1
if [[ $? -eq 0 ]] ; then
echo_ok
else
echo_failed
error "$(cat $tmp_err_msg)"
fi
# - Deinstall debian exim4 packages # - Deinstall debian exim4 packages
# - # -
echononl " Deinstall debian exim4 packages" echononl " Deinstall debian exim4 packages"