diff --git a/setup/dkim.sh b/setup/dkim.sh index 1c42e076..2e1632f1 100755 --- a/setup/dkim.sh +++ b/setup/dkim.sh @@ -10,6 +10,7 @@ source setup/functions.sh # load our functions source /etc/mailinabox.conf # load global vars # Install DKIM... +echo Installing OpenDKIM/OpenDMARC... apt_install opendkim opendkim-tools opendmarc # Make sure configuration directories exist. diff --git a/setup/dns.sh b/setup/dns.sh index cbd5be8a..996c72f2 100755 --- a/setup/dns.sh +++ b/setup/dns.sh @@ -15,7 +15,7 @@ source /etc/mailinabox.conf # load global vars # * nsd: The non-recursive nameserver that publishes our DNS records. # * ldnsutils: Helper utilities for signing DNSSEC zones. # * openssh-client: Provides ssh-keyscan which we use to create SSHFP records. - +echo "Installing nsd (DNS server)..." apt_install nsd ldnsutils openssh-client # Prepare nsd's configuration. diff --git a/setup/functions.sh b/setup/functions.sh index 7482b2b9..947aa5ab 100644 --- a/setup/functions.sh +++ b/setup/functions.sh @@ -39,32 +39,12 @@ function apt_get_quiet { } function apt_install { - # Report any packages already installed. + # Install a bunch of packages. We used to report which packages were already + # installed and which needed installing, before just running an 'apt-get + # install' for all of the packages. Calling `dpkg` on each package is slow, + # and doesn't affect what we actually do, except in the messages, so let's + # not do that anymore. PACKAGES=$@ - TO_INSTALL="" - ALREADY_INSTALLED="" - for pkg in $PACKAGES; do - if dpkg -s $pkg 2>/dev/null | grep "^Status: install ok installed" > /dev/null; then - if [[ ! -z "$ALREADY_INSTALLED" ]]; then ALREADY_INSTALLED="$ALREADY_INSTALLED, "; fi - ALREADY_INSTALLED="$ALREADY_INSTALLED$pkg (`dpkg -s $pkg | grep ^Version: | sed -e 's/.*: //'`)" - else - TO_INSTALL="$TO_INSTALL""$pkg " - fi - done - - # List the packages already installed. - if [[ ! -z "$ALREADY_INSTALLED" ]]; then - echo already installed: $ALREADY_INSTALLED - fi - - # List the packages about to be installed. - if [[ ! -z "$TO_INSTALL" ]]; then - echo installing $TO_INSTALL... - fi - - # We still include the whole original package list in the apt-get command in - # case it wants to upgrade anything, I guess? Maybe we can remove it. Doesn't normally make - # a difference. apt_get_quiet install $PACKAGES } diff --git a/setup/mail-dovecot.sh b/setup/mail-dovecot.sh index 4b681765..1e354b28 100755 --- a/setup/mail-dovecot.sh +++ b/setup/mail-dovecot.sh @@ -23,6 +23,7 @@ source /etc/mailinabox.conf # load global vars # but dovecot-lucene is packaged by *us* in the Mail-in-a-Box PPA, # not by Ubuntu. +echo "Installing Dovecot (IMAP server)..." apt_install \ dovecot-core dovecot-imapd dovecot-pop3d dovecot-lmtpd dovecot-sqlite sqlite3 \ dovecot-sieve dovecot-managesieved dovecot-lucene diff --git a/setup/mail-postfix.sh b/setup/mail-postfix.sh index 23a0b011..6124d64e 100755 --- a/setup/mail-postfix.sh +++ b/setup/mail-postfix.sh @@ -49,6 +49,7 @@ source /etc/mailinabox.conf # load global vars # > infrastructure and every commercial vendor of dnswl.org data (eg through # > anti-spam solutions) must register with dnswl.org and purchase a subscription. +echo "Installing Postfix (SMTP server)..." apt_install postfix postfix-pcre postgrey ca-certificates # ### Basic Settings diff --git a/setup/management.sh b/setup/management.sh index 3df2c72e..14a51371 100755 --- a/setup/management.sh +++ b/setup/management.sh @@ -2,6 +2,8 @@ source setup/functions.sh +echo "Installing Mail-in-a-Box system management daemon..." + # build-essential libssl-dev libffi-dev python3-dev: Required to pip install cryptography. apt_install python3-flask links duplicity libyaml-dev python3-dnspython python3-dateutil \ build-essential libssl-dev libffi-dev python3-dev python-pip diff --git a/setup/munin.sh b/setup/munin.sh index 87922ca6..f936e8e7 100755 --- a/setup/munin.sh +++ b/setup/munin.sh @@ -6,6 +6,7 @@ source setup/functions.sh # load our functions source /etc/mailinabox.conf # load global vars # install Munin +echo "Installing Munin (system monitoring)..." apt_install munin munin-node # edit config diff --git a/setup/owncloud.sh b/setup/owncloud.sh index fddbb8c7..28665813 100755 --- a/setup/owncloud.sh +++ b/setup/owncloud.sh @@ -7,6 +7,8 @@ source /etc/mailinabox.conf # load global vars # ### Installing ownCloud +echo "Installing ownCloud (contacts/calendar)..." + apt_install \ dbconfig-common \ php5-cli php5-sqlite php5-gd php5-imap php5-curl php-pear php-apc curl libapr1 libtool libcurl4-openssl-dev php-xml-parser \ @@ -35,7 +37,6 @@ if [ ! -d /usr/local/lib/owncloud/ ] \ || ! grep -q $owncloud_ver /usr/local/lib/owncloud/version.php; then # Download and verify - echo "installing ownCloud..." wget_verify https://download.owncloud.org/community/owncloud-$owncloud_ver.zip $owncloud_hash /tmp/owncloud.zip # Clear out the existing ownCloud. diff --git a/setup/spamassassin.sh b/setup/spamassassin.sh index b6aaa67e..f72f606d 100755 --- a/setup/spamassassin.sh +++ b/setup/spamassassin.sh @@ -16,6 +16,7 @@ source setup/functions.sh # load our functions # ---------------------------------------- # Install packages. +echo "Installing SpamAssassin..." apt_install spampd razor pyzor dovecot-antispam # Allow spamassassin to download new rules. diff --git a/setup/ssl.sh b/setup/ssl.sh index 756c5305..a604672d 100755 --- a/setup/ssl.sh +++ b/setup/ssl.sh @@ -19,6 +19,7 @@ source setup/functions.sh # load our functions source /etc/mailinabox.conf # load global vars +echo "Creating initial SSL certificate and perfect forward secrecy Diffie-Hellman parameters..." apt_install openssl mkdir -p $STORAGE_ROOT/ssl diff --git a/setup/system.sh b/setup/system.sh index 2d929f9d..b23098ce 100755 --- a/setup/system.sh +++ b/setup/system.sh @@ -51,6 +51,7 @@ apt_get_quiet upgrade # * coreutils: includes `nproc` tool to report number of processors, mktemp # * bc: allows us to do math to compute sane defaults +echo Installing system packages... apt_install python3 python3-dev python3-pip \ netcat-openbsd wget curl git sudo coreutils bc \ haveged unattended-upgrades cron ntp fail2ban diff --git a/setup/web.sh b/setup/web.sh index 6c0e9a48..ff7d78b4 100755 --- a/setup/web.sh +++ b/setup/web.sh @@ -17,6 +17,7 @@ fi # # Turn off nginx's default website. +echo "Installing Nginx (web server)..." apt_install nginx php5-fpm rm -f /etc/nginx/sites-enabled/default diff --git a/setup/webmail.sh b/setup/webmail.sh index b180ce8f..3f258829 100755 --- a/setup/webmail.sh +++ b/setup/webmail.sh @@ -19,6 +19,7 @@ source /etc/mailinabox.conf # load global vars # and then we'll manually install roundcube from source. # These dependencies are from `apt-cache showpkg roundcube-core`. +echo "Installing Roundcube (webmail)..." apt_install \ dbconfig-common \ php5 php5-sqlite php5-mcrypt php5-intl php5-json php5-common php-auth php-net-smtp php-net-socket php-net-sieve php-mail-mime php-mail-mimedecode php-crypt-gpg php5-gd php5-pspell \ @@ -47,7 +48,6 @@ elif [[ "$UPDATE_KEY" != `cat /usr/local/lib/roundcubemail/version` ]]; then fi if [ $needs_update == 1 ]; then # install roundcube - echo installing Roundcube webmail $VERSION... wget_verify \ https://mailinabox.email/mirror/roundcubemail-$VERSION.tar.gz \ $HASH \ diff --git a/setup/zpush.sh b/setup/zpush.sh index 3b5d0bdf..1acc0897 100755 --- a/setup/zpush.sh +++ b/setup/zpush.sh @@ -15,6 +15,7 @@ source /etc/mailinabox.conf # load global vars # Prereqs. +echo "Installing Z-Push (Exchange/ActiveSync server)..." apt_install \ php-soap php5-imap libawl-php php5-xsl @@ -30,7 +31,6 @@ elif [[ $TARGETHASH != `cat /usr/local/lib/z-push/version` ]]; then needs_update=1 #NODOC fi if [ $needs_update == 1 ]; then - echo installing z-push \(fmbiete fork\)... git_clone https://github.com/fmbiete/Z-Push-contrib $TARGETHASH '' /usr/local/lib/z-push rm -f /usr/sbin/z-push-{admin,top} ln -s /usr/local/lib/z-push/z-push-admin.php /usr/sbin/z-push-admin