diff --git a/drydocker/generic_integration.sh b/drydocker/generic_integration.sh index f698e77..81457e5 100644 --- a/drydocker/generic_integration.sh +++ b/drydocker/generic_integration.sh @@ -1,59 +1,64 @@ #!/bin/bash set -x function generic_integration_install { retval=0 max_tries=10 try_retval=1 while [ ${try_retval} -ne 0 -a ${max_tries} -gt 0 ]; do try_retval=$(_shell yum -y install kolab) if [ ${try_retval} -eq 0 ]; then max_tries=0 retval=0 break else echo "WARNING: Could not install kolab, sleeping for 10 seconds." >&3 yum clean metadata let max_tries-- retval=${try_retval} fi sleep 10 done if [ ${retval} -ne 0 ]; then return ${retval} fi } function generic_integration_setup { if [ ! -d "/var/lock" ]; then mkdir /run/lock fi if [ ! -x "$(which setup-kolab 2>/dev/null)" ]; then retval=$(_shell generic_integration_install) if [ ${retval} -ne 0 ]; then return ${retval} fi fi if [ "$(find /etc/dirsrv/slapd-*/ -type f 2>/dev/null | wc -l)" -ne 0 ]; then echo "Kolab Groupware already set up?" fi retval=$(_shell setup-kolab \ --default \ --mysqlserver=new \ --timezone=Europe/Zurich \ --directory-manager-pwd=Welcome2KolabSystems ) + if [ ${retval} -ne 0 ]; then + cat /var/log/kolab/setup.error.log + cat /var/log/kolab/setup.out.log + fi + return ${retval} } diff --git a/drydocker/guam/test_integration.sh b/drydocker/guam/test_integration.sh index fbe5186..c815e8a 100755 --- a/drydocker/guam/test_integration.sh +++ b/drydocker/guam/test_integration.sh @@ -1,54 +1,58 @@ #!/bin/bash source /srv/stick.git/drydocker/generic_integration.sh # This installs Kolab Groupware retval=$(_shell generic_integration_install) # This sets up Kolab Groupware retval=$(_shell generic_integration_setup) +if [ ${retval} -ne 0 ]; then + exit ${retval} +fi + set -x if [ ! -f "/etc/pki/tls/private/localhost.pem" ]; then pushd /etc/pki/tls/certs/ ./make-dummy-cert ../private/localhost.pem popd fi sed -e 's/:993/:9993/g' \ /etc/kolab/kolab.conf > /etc/kolab/kolab.guam.conf guam start sleep 10 guam ping; retval=$? if [ ${retval} -ne 0 ]; then echo "FAILED to start guam. Does not respond to ping." exit ${retval} fi retval=0 for test_script in `ls -1 /srv/stick.git/drydocker/guam/tests/*.sh`; do if [ ! -x "${test_script}" ]; then echo "SKIPPING ${test_script}, not executable" >&3 continue fi retval2=$(_shell ${test_script}); retval=$(( ${retval2} + $? )) done guam stop killall -9 epmd set - -x if [ ${retval} -ne 0 ]; then exit ${retval} fi