From 25fc6d3b7aba434c554ae5ad54ebd7e68f69c3eb Mon Sep 17 00:00:00 2001 From: Christoph Date: Sun, 22 Oct 2017 15:10:18 +0200 Subject: [PATCH] Add/Fix Synchronising package index files with debian repositories. --- install_amavis.sh | 12 ++++++++++++ install_postfix_advanced.sh | 2 +- install_postfix_base.sh | 11 +++++++++++ install_postfixadmin.sh | 11 +++++++++++ install_roundcube.sh | 12 ++++++++++++ 5 files changed, 47 insertions(+), 1 deletion(-) diff --git a/install_amavis.sh b/install_amavis.sh index 0ae8811..95d95ca 100755 --- a/install_amavis.sh +++ b/install_amavis.sh @@ -731,6 +731,18 @@ tmp_err_msg=$(mktemp) echo echo -e "\033[37m\033[1mSome pre-installation tasks..\033[m" echo + +# - Synchronise package index files with the repository +# - +echononl " Synchronise package index files with the repository.." +apt-get update > "$tmp_err_msg" 2>&1 +if [[ $? -eq 0 ]] ; then + echo_ok +else + echo_failed + error "$(cat $tmp_err_msg)" +fi + # - Install Prerequisites from debian package system # - echononl " Install prerequisites from debian package system" diff --git a/install_postfix_advanced.sh b/install_postfix_advanced.sh index 0971700..46ec482 100755 --- a/install_postfix_advanced.sh +++ b/install_postfix_advanced.sh @@ -356,7 +356,7 @@ fi # - Synchronise package index files with the repository # - echononl " Synchronise package index files with the repository.." -apt-get update > error "$tmp_err_msg" 2>&1 +apt-get update > "$tmp_err_msg" 2>&1 if [[ $? -eq 0 ]] ; then echo_ok else diff --git a/install_postfix_base.sh b/install_postfix_base.sh index b1896af..b09e9df 100755 --- a/install_postfix_base.sh +++ b/install_postfix_base.sh @@ -364,6 +364,17 @@ fi [[ "$IPV6" = "disabled" ]] && IPV6="" +# - Synchronise package index files with the repository +# - +echononl " Synchronise package index files with the repository.." +apt-get update > /dev/null 2>&1 +if [[ $? -eq 0 ]] ; then + echo_ok +else + echo_failed +fi + + # - Deinstall debian exim4 packages # - echononl " Deinstall debian exim4 packages" diff --git a/install_postfixadmin.sh b/install_postfixadmin.sh index f3b6135..e317a46 100755 --- a/install_postfixadmin.sh +++ b/install_postfixadmin.sh @@ -558,6 +558,17 @@ else fi fi +# - Synchronise package index files with the repository +# - +echononl "\tSynchronise package index files with the repository.." +apt-get update > "$log_file" 2>&1 +if [[ $? -eq 0 ]] ; then + echo_ok +else + echo_failed + error "$(cat $log_file)" +fi + echononl "\tInstall needed debian packages.." needed_packages="" _needed_packages=" diff --git a/install_roundcube.sh b/install_roundcube.sh index 61baff8..12f4858 100755 --- a/install_roundcube.sh +++ b/install_roundcube.sh @@ -1685,6 +1685,18 @@ fi echo -e "\n\n\t\033[37m\033[1mEnable Spellcheccking..\033[m\n" +# - Synchronise package index files with the repository +# - +echononl " Synchronise package index files with the repository.." +apt-get update > "$log_file" 2>&1 +if [[ $? -eq 0 ]] ; then + echo_ok +else + echo_failed + error "$(cat $log_file)" +fi + + echononl "\tInstall needed debian packages.." needed_packages_spell="" _needed_packages_spell="