diff --git a/install/_test_setup.sh b/install/_test_setup.sh index 3a44099..e00d8d6 100644 --- a/install/_test_setup.sh +++ b/install/_test_setup.sh @@ -13,6 +13,8 @@ teardown() { } setup() { + cd .. + # Clone the local repo into a temp dir. FWIW `git clone --local` breaks for # me because it depends on hard-linking, which doesn't work across devices, # and I happen to have my workspace and /tmp on separate devices. @@ -42,7 +44,7 @@ setup() { esac done - cd "$_SANDBOX" + cd "$_SANDBOX/install" trap teardown EXIT } diff --git a/install/geoip-test.sh b/install/geoip-test.sh index f6c55cc..3d61c11 100755 --- a/install/geoip-test.sh +++ b/install/geoip-test.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash source "$(dirname $0)/_test_setup.sh" -mmdb="geoip/GeoLite2-City.mmdb" +mmdb="../geoip/GeoLite2-City.mmdb" # Starts with no mmdb, ends up with empty. test ! -f $mmdb diff --git a/install/geoip.sh b/install/geoip.sh index 9a1317b..bc5d84b 100644 --- a/install/geoip.sh +++ b/install/geoip.sh @@ -1,8 +1,10 @@ echo "${_group}Setting up GeoIP integration ..." install_geoip() { - local mmdb='geoip/GeoLite2-City.mmdb' - local conf='geoip/GeoIP.conf' + cd ../geoip + + local mmdb='GeoLite2-City.mmdb' + local conf='GeoIP.conf' local result='Done' echo "Setting up IP address geolocation ..." @@ -27,6 +29,8 @@ install_geoip() { echo "$result updating IP address geolocation database." fi echo "$result setting up IP address geolocation." + + cd ../install } install_geoip diff --git a/install/relay-credentials-test.sh b/install/relay-credentials-test.sh index c025410..ea740f3 100755 --- a/install/relay-credentials-test.sh +++ b/install/relay-credentials-test.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash source "$(dirname $0)/_test_setup.sh" -cfg="relay/config.yml" -creds="relay/credentials.json" +cfg="../relay/config.yml" +creds="../relay/credentials.json" # Relay files don't exist in a clean clone. test ! -f $cfg diff --git a/install/relay-credentials.sh b/install/relay-credentials.sh index 91fe34d..2d62e2b 100644 --- a/install/relay-credentials.sh +++ b/install/relay-credentials.sh @@ -1,7 +1,7 @@ echo "${_group}Generating Relay credentials ..." -RELAY_CONFIG_YML="relay/config.yml" -RELAY_CREDENTIALS_JSON="relay/credentials.json" +RELAY_CONFIG_YML="../relay/config.yml" +RELAY_CREDENTIALS_JSON="../relay/credentials.json" ensure_file_from_example $RELAY_CONFIG_YML