#!/usr/bin/env bash DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" YML=$DIR/../containers/app.yml if [ -f $YML ] then echo "cannot run test if $YML exists." exit fi check_value () { VAR=$1 VAL=$2 YML=$3 if ! [[ $(grep $VAR $YML |sed -e "s/ $VAR: //") == "$VAL" ]] then echo $VAR is NOT $VAL echo TEST FAILED. Aborting. exit 1 fi } # get old (Sep 6, 2016) standalone.yml that's missing MAXMIND and other values git show 7cf781fc0cf2542040f35e40cf79a1ab079c59f0:samples/standalone.yml>containers/app.yml > $YML hostname='new.myhost.com' developer='new@mail.myhost.com' smtp_address='new.myhostn.com' smtp_port='2525' smtp_user='newuser' smtp_pass='new-smtp-pw' notification='somuser@otherhost.com' smtp_domain=otherhost.com # NOTE: script uses notification hostnme letsencrypt='le-new@myhost.com' maxmind='maxthisone' $DIR/../discourse-setup --skip-connection-test --skip-rebuild < $YML hostname='new.myhost.com' developer='new-admin@mail.myhost.com' smtp_address='new.myhostn.com' smtp_port='2525' smtp_user='newuser' smtp_pass='new-smtp-pw' notification='somuser@otherhost.com' smtp_domain=otherhost.com # NOTE: script uses notification hostnme letsencrypt='le-new@myhost.com' maxmind='maxthisone' $DIR/../discourse-setup --skip-connection-test --skip-rebuild <