mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-10 01:17:19 +00:00
Skip system updates if SKIP_SYSTEM_UPDATE environment variable is set to "1"
This commit is contained in:
parent
2b2856b517
commit
5eb008cae9
@ -99,15 +99,17 @@ hide_output add-apt-repository -y ppa:certbot/certbot
|
|||||||
# of things from Ubuntu, as well as the directory of packages provide by the
|
# of things from Ubuntu, as well as the directory of packages provide by the
|
||||||
# PPAs so we can install those packages later.
|
# PPAs so we can install those packages later.
|
||||||
|
|
||||||
echo Updating system packages...
|
if [ "$SKIP_SYSTEM_UPDATE" != "1" ]; then
|
||||||
hide_output apt-get update
|
echo Updating system packages...
|
||||||
apt_get_quiet upgrade
|
hide_output apt-get update
|
||||||
|
apt_get_quiet upgrade
|
||||||
|
|
||||||
# Old kernels pile up over time and take up a lot of disk space, and because of Mail-in-a-Box
|
# Old kernels pile up over time and take up a lot of disk space, and because of Mail-in-a-Box
|
||||||
# changes there may be other packages that are no longer needed. Clear out anything apt knows
|
# changes there may be other packages that are no longer needed. Clear out anything apt knows
|
||||||
# is safe to delete.
|
# is safe to delete.
|
||||||
|
|
||||||
apt_get_quiet autoremove
|
apt_get_quiet autoremove
|
||||||
|
fi
|
||||||
|
|
||||||
# ### Install System Packages
|
# ### Install System Packages
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
export PRIMARY_HOSTNAME=${PRIMARY_HOSTNAME:-$(hostname --fqdn || hostname)}
|
export PRIMARY_HOSTNAME=${PRIMARY_HOSTNAME:-$(hostname --fqdn || hostname)}
|
||||||
export NONINTERACTIVE=${NONINTERACTIVE:-1}
|
export NONINTERACTIVE=${NONINTERACTIVE:-1}
|
||||||
export SKIP_NETWORK_CHECKS=${SKIP_NETWORK_CHECKS:-1}
|
export SKIP_NETWORK_CHECKS=${SKIP_NETWORK_CHECKS:-1}
|
||||||
|
export SKIP_SYSTEM_UPDATE=${SKIP_SYSTEM_UPDATE:-1}
|
||||||
export STORAGE_USER="${STORAGE_USER:-user-data}"
|
export STORAGE_USER="${STORAGE_USER:-user-data}"
|
||||||
export STORAGE_ROOT="${STORAGE_ROOT:-/home/$STORAGE_USER}"
|
export STORAGE_ROOT="${STORAGE_ROOT:-/home/$STORAGE_USER}"
|
||||||
export EMAIL_ADDR="${EMAIL_ADDR:-qa@abc.com}"
|
export EMAIL_ADDR="${EMAIL_ADDR:-qa@abc.com}"
|
||||||
|
@ -84,7 +84,7 @@ init_test_system() {
|
|||||||
# is upgraded through automatic upgrades (because maybe MiaB was
|
# is upgraded through automatic upgrades (because maybe MiaB was
|
||||||
# previously installed), it may cause problems with the rest of
|
# previously installed), it may cause problems with the rest of
|
||||||
# the setup, such as with name resolution failures
|
# the setup, such as with name resolution failures
|
||||||
if is_false "$TRAVIS"; then
|
if is_false "$TRAVIS" && [ "$SKIP_SYSTEM_UPDATE" != "1" ]; then
|
||||||
H2 "apt-get upgrade"
|
H2 "apt-get upgrade"
|
||||||
wait_for_apt
|
wait_for_apt
|
||||||
apt-get upgrade -qq || die "apt-get upgrade failed!"
|
apt-get upgrade -qq || die "apt-get upgrade failed!"
|
||||||
|
Loading…
Reference in New Issue
Block a user