2 DIR
="$( cd "$
( dirname "${BASH_SOURCE[0]}" )" && pwd )"
3 YML
=$DIR/..
/containers
/app.yml
6 echo "cannot run test if $YML exists."
14 if ! [[ $
(grep $VAR $YML |
sed -e "s/ $VAR: //") == "$VAL" ]]
17 echo TEST FAILED. Aborting.
22 hostname
='test.myhost.com'
23 developer
='admin@mail.myhost.com'
24 smtp_address
='smtp.myhostn.com'
29 letsencrypt
='le@myhost.com'
31 $DIR/..
/discourse-setup
--skip-connection-test --skip-rebuild <<EOF
44 check_value DISCOURSE_HOSTNAME
$hostname $YML
45 check_value DISCOURSE_SMTP_ADDRESS
$smtp_address $YML
46 check_value DISCOURSE_SMTP_PORT
587 $YML
47 check_value DISCOURSE_SMTP_USER_NAME
$smtp_user $YML
48 check_value DISCOURSE_SMTP_PASSWORD
\"$smtp_pass\" $YML
49 check_value DISCOURSE_SMTP_DOMAIN
$hostname $YML
50 check_value DISCOURSE_NOTIFICATION_EMAIL noreply@
$hostname $YML
51 echo "################################ Initial install succeeded. ###################################"
52 echo "Now running edit test."
53 hostname
='new.myhost.com'
54 developer
='new@mail.myhost.com'
55 smtp_address
='new.myhostn.com'
58 smtp_pass
='new-smtp-pw'
59 notification
='somuser@otherhost.com'
60 smtp_domain
=otherhost.com
# NOTE: script uses notification hostnme
61 letsencrypt
='le-new@myhost.com'
63 $DIR/..
/discourse-setup
--skip-connection-test --skip-rebuild <<EOF
76 check_value DISCOURSE_HOSTNAME
$hostname $YML
77 check_value DISCOURSE_SMTP_ADDRESS
$smtp_address $YML
78 check_value DISCOURSE_SMTP_PORT
$smtp_port $YML
79 check_value DISCOURSE_SMTP_USER_NAME
$smtp_user $YML
80 check_value DISCOURSE_SMTP_PASSWORD
\"$smtp_pass\" $YML
81 check_value DISCOURSE_SMTP_DOMAIN
$smtp_domain $YML
82 check_value DISCOURSE_NOTIFICATION_EMAIL
$notification $YML
83 echo "################################ Update of values succeeded. ###################################"
87 echo "Test succeeded. Removing $YML"