From 3bf643464907617c6913e20485c32d6adb78ab82 Mon Sep 17 00:00:00 2001 From: Robert Hafner Date: Mon, 20 Jan 2014 15:20:46 -0800 Subject: [PATCH] Updated script output to be a bit more informative --- SetupEnvironment.sh | 13 ++++++------- resources/Scripts/Provision.sh | 13 +++++++++---- resources/Scripts/ResetMail.sh | 2 +- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/SetupEnvironment.sh b/SetupEnvironment.sh index cb51472..1ac25c9 100755 --- a/SetupEnvironment.sh +++ b/SetupEnvironment.sh @@ -8,17 +8,12 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" if [ -n "$TRAVIS" ]; then - echo 'Travis config not yet written' + echo 'Starting Travis Provisioning' if [ ! -d "$DIR/resources" ]; then - DIR="$( dirname $(find ./ -name 'SetupEnvironment.sh') )" DIR="$( dirname $(find $TRAVIS_BUILD_DIR -name '.dovecottestingmark') )" fi - if [ ! -d "$DIR/resources" ]; then - DIR="$( dirname $(find $TRAVIS_BUILD_DIR -name 'SetupEnvironment.sh') )" - fi - sudo cp -Rp $DIR/resources /resources sudo /bin/bash /resources/Scripts/Provision.sh sudo /bin/bash /resources/Scripts/SSL.sh @@ -27,6 +22,8 @@ else # Since not in travis, lets load up a system with vagrant + echo 'Starting Vagrant Provisioning' + cd $DIR/vagrant VAGRANTSTATUS=$(vagrant status) @@ -39,4 +36,6 @@ else fi cd $DIR -fi \ No newline at end of file +fi + +echo 'Environment has finished being setup' \ No newline at end of file diff --git a/resources/Scripts/Provision.sh b/resources/Scripts/Provision.sh index 32229c3..a711f0f 100644 --- a/resources/Scripts/Provision.sh +++ b/resources/Scripts/Provision.sh @@ -14,6 +14,7 @@ else sudo echo 'disable_plaintext_auth = no' >> /etc/dovecot/local.conf sudo echo 'mail_max_userip_connections = 10000' >> /etc/dovecot/local.conf sudo restart dovecot + echo 'Dovecot has been installed' fi @@ -22,9 +23,10 @@ fi if getent passwd testuser > /dev/null; then echo 'testuser already exists' else - echo 'Creating User "testuser"' + echo 'Creating User "testuser" with password "applesauce"' sudo useradd testuser -m -s /bin/bash - echo "testuser:applesauce"|sudo chpasswd + echo "testuser:applesauce" | sudo chpasswd + echo 'User created' fi @@ -32,5 +34,8 @@ fi /bin/bash /resources/Scripts/ResetMail.sh - -echo 'Environment has been provisioned' \ No newline at end of file +echo '' +echo '' +echo 'Dovecot has been provisioned with the test mailbox.' +echo '' +echo '' \ No newline at end of file diff --git a/resources/Scripts/ResetMail.sh b/resources/Scripts/ResetMail.sh index 2f94d5c..c7ec4aa 100644 --- a/resources/Scripts/ResetMail.sh +++ b/resources/Scripts/ResetMail.sh @@ -1,6 +1,6 @@ #!/bin/sh -echo 'Refreshing the test mailbox- this could take a minute.' +echo 'Refreshing the test mailbox.' sudo stop dovecot [ -d "/home/testuser/Maildir" ] && sudo rm -R /home/testuser/Maildir