1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2025-04-04 00:17:06 +00:00

Get rid of globals.sh

This commit is contained in:
downtownallday 2022-01-29 10:59:02 -05:00
parent 4e6550ed22
commit 46e0e6ff39
4 changed files with 14 additions and 9 deletions

View File

@ -1,7 +1,9 @@
#!/bin/bash #!/bin/bash
export MIAB_LDAP_PROJECT=true
# Used by setup/start.sh # Used by setup/start.sh
export PRIMARY_HOSTNAME=${PRIMARY_HOSTNAME:-$(hostname --fqdn || hostname)} export PRIMARY_HOSTNAME=${PRIMARY_HOSTNAME:-$(hostname --fqdn 2>/dev/null || 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 SKIP_SYSTEM_UPDATE=${SKIP_SYSTEM_UPDATE:-1}
@ -11,10 +13,19 @@ export STORAGE_ROOT="${STORAGE_ROOT:-/home/$STORAGE_USER}"
export EMAIL_ADDR="${EMAIL_ADDR:-qa@abc.com}" export EMAIL_ADDR="${EMAIL_ADDR:-qa@abc.com}"
export EMAIL_PW="${EMAIL_PW:-Test_1234}" export EMAIL_PW="${EMAIL_PW:-Test_1234}"
export PUBLIC_IP="${PUBLIC_IP:-$(source ${MIAB_DIR:-.}/setup/functions.sh; get_default_privateip 4)}" export PUBLIC_IP="${PUBLIC_IP:-$(source ${MIAB_DIR:-.}/setup/functions.sh; get_default_privateip 4)}"
export LOCAL_MODS_DIR="${LOCAL_MODS_DIR:-local}" if lsmod | grep "^vboxguest[\t ]" >/dev/null; then
# The local mods directory defaults to 'local' (relative to the
# source tree, which is a mounted filesystem of the host). This
# will keep mods directory out of the source tree when running
# under virtualbox / vagrant.
export LOCAL_MODS_DIR="${LOCAL_MODS_DIR:-/local}"
else
export LOCAL_MODS_DIR="${LOCAL_MODS_DIR:-local}"
fi
export DOWNLOAD_CACHE_DIR="${DOWNLOAD_CACHE_DIR:-$(pwd)/downloads}" export DOWNLOAD_CACHE_DIR="${DOWNLOAD_CACHE_DIR:-$(pwd)/downloads}"
export DOWNLOAD_NEXTCLOUD_FROM_GITHUB="${DOWNLOAD_NEXTCLOUD_FROM_GITHUB:-false}" export DOWNLOAD_NEXTCLOUD_FROM_GITHUB="${DOWNLOAD_NEXTCLOUD_FROM_GITHUB:-false}"
# Used by ehdd/start-encrypted.sh # Used by ehdd/start-encrypted.sh
export EHDD_KEYFILE="${EHDD_KEYFILE:-}" export EHDD_KEYFILE="${EHDD_KEYFILE:-}"
export EHDD_GB="${EHDD_GB:-2}" export EHDD_GB="${EHDD_GB:-2}"
@ -43,3 +54,4 @@ export UPSTREAM_TAG="${UPSTREAM_TAG:-}"
# For setup scripts that install miabldap releases # For setup scripts that install miabldap releases
export MIABLDAP_GIT="${MIABLDAP_GIT:-https://github.com/downtownallday/mailinabox-ldap.git}" export MIABLDAP_GIT="${MIABLDAP_GIT:-https://github.com/downtownallday/mailinabox-ldap.git}"
export MIABLDAP_RELEASE_TAG="${MIABLDAP_RELEASE_TAG:-v55}" export MIABLDAP_RELEASE_TAG="${MIABLDAP_RELEASE_TAG:-v55}"

View File

@ -11,7 +11,6 @@ Vagrant.configure("2") do |config|
config.vm.define "remote-nextcloud-docker-ehdd" do |m1| config.vm.define "remote-nextcloud-docker-ehdd" do |m1|
m1.vm.provision :shell, :inline => <<-SH m1.vm.provision :shell, :inline => <<-SH
cd /mailinabox cd /mailinabox
source tests/vagrant/globals.sh || exit 1
export PRIMARY_HOSTNAME=qa1.abc.com export PRIMARY_HOSTNAME=qa1.abc.com
export FEATURE_MUNIN=false export FEATURE_MUNIN=false
export EHDD_KEYFILE=$HOME/keyfile export EHDD_KEYFILE=$HOME/keyfile
@ -27,7 +26,6 @@ SH
config.vm.define "remote-nextcloud-docker" do |m1| config.vm.define "remote-nextcloud-docker" do |m1|
m1.vm.provision :shell, :inline => <<-SH m1.vm.provision :shell, :inline => <<-SH
cd /mailinabox cd /mailinabox
source tests/vagrant/globals.sh || exit 1
export PRIMARY_HOSTNAME=qa2.abc.com export PRIMARY_HOSTNAME=qa2.abc.com
export FEATURE_MUNIN=false export FEATURE_MUNIN=false
tests/system-setup/remote-nextcloud-docker.sh upgrade basic || exit 1 tests/system-setup/remote-nextcloud-docker.sh upgrade basic || exit 1
@ -41,7 +39,6 @@ SH
config.vm.define "upgrade-from-upstream" do |m1| config.vm.define "upgrade-from-upstream" do |m1|
m1.vm.provision :shell, :inline => <<-SH m1.vm.provision :shell, :inline => <<-SH
cd /mailinabox cd /mailinabox
source tests/vagrant/globals.sh || exit 1
export PRIMARY_HOSTNAME=qa3.abc.com export PRIMARY_HOSTNAME=qa3.abc.com
export UPSTREAM_TAG=jammyjellyfish2204 export UPSTREAM_TAG=jammyjellyfish2204
tests/system-setup/upgrade-from-upstream.sh basic totpuser || exit 1 tests/system-setup/upgrade-from-upstream.sh basic totpuser || exit 1
@ -59,7 +56,6 @@ SH
config.vm.define "upgrade" do |m1| config.vm.define "upgrade" do |m1|
m1.vm.provision :shell, :inline => <<-SH m1.vm.provision :shell, :inline => <<-SH
cd /mailinabox cd /mailinabox
source tests/vagrant/globals.sh || exit 1
export PRIMARY_HOSTNAME=upgrade.abc.com export PRIMARY_HOSTNAME=upgrade.abc.com
tests/system-setup/upgrade.sh basic totpuser || exit 1 tests/system-setup/upgrade.sh basic totpuser || exit 1
tests/runner.sh upgrade-basic upgrade-totpuser default || exit 2 tests/runner.sh upgrade-basic upgrade-totpuser default || exit 2

View File

@ -1,2 +0,0 @@
export MIAB_LDAP_PROJECT=true
export LOCAL_MODS_DIR=/local

View File

@ -11,7 +11,6 @@ Vagrant.configure("2") do |config|
config.vm.define "vanilla" do |m1| config.vm.define "vanilla" do |m1|
m1.vm.provision :shell, :inline => <<-SH m1.vm.provision :shell, :inline => <<-SH
cd /mailinabox cd /mailinabox
source tests/vagrant/globals.sh || exit 1
export PRIMARY_HOSTNAME=vanilla.local export PRIMARY_HOSTNAME=vanilla.local
export FEATURE_MUNIN=false export FEATURE_MUNIN=false
tests/system-setup/vanilla.sh tests/system-setup/vanilla.sh