Skip to content

Commit

Permalink
config change support (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjn authored Dec 28, 2020
1 parent c551ac7 commit 987f0df
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
17 changes: 13 additions & 4 deletions tideways/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@
# Tideways with XHGui
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

configs=(
/srv/vvv/config.yml
/vagrant/config.yml
/vagrant/vvv-config.yml
)
VVV_CONFIG=/srv/vvv/config.yml
for item in ${configs[*]}; do
if [[ -f $item ]]; then
VVV_CONFIG=$item
break
fi
done

function fetch_tideways_repo() {
if [[ ! -d /var/local/tideways-php/.git ]]; then
echo " * Cloning Tideways extension"
Expand Down Expand Up @@ -112,10 +125,6 @@ function install_xhgui_frontend() {
function enable_tideways_by_site() {
echo " * Tideways-by-site started"

VVV_CONFIG=/vagrant/vvv-custom.yml
if [[ -f /vagrant/config.yml ]]; then
VVV_CONFIG=/vagrant/config.yml
fi
php "${DIR}/by-site.php" "${VVV_CONFIG}"

echo " * Tideways-by-site finished"
Expand Down
16 changes: 12 additions & 4 deletions tls-ca/provision.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

VVV_CONFIG=/vagrant/vvv-custom.yml
if [[ -f /vagrant/config.yml ]]; then
VVV_CONFIG=/vagrant/config.yml
fi
configs=(
/srv/vvv/config.yml
/vagrant/config.yml
/vagrant/vvv-config.yml
)
VVV_CONFIG=/srv/vvv/config.yml
for item in ${configs[*]}; do
if [[ -f $item ]]; then
VVV_CONFIG=$item
break
fi
done

codename=$(lsb_release --codename | cut -f2)
CERTIFICATES_DIR="/srv/certificates"
Expand Down

0 comments on commit 987f0df

Please sign in to comment.