diff --git a/docker/roundcube/rootfs/opt/app-root/src/init.sh b/docker/roundcube/rootfs/opt/app-root/src/init.sh index 2530b024..f8485285 100755 --- a/docker/roundcube/rootfs/opt/app-root/src/init.sh +++ b/docker/roundcube/rootfs/opt/app-root/src/init.sh @@ -1,102 +1,105 @@ #!/bin/bash echo "Starting" set -e set -x mkdir -p /data/pgp-home chmod 777 /data/pgp-home pushd /opt/app-root/src/ pushd roundcubemail ## Copy our configs over the default ones cp /opt/app-root/src/roundcubemail-config-templates/* config/ DES_KEY=$(openssl rand -base64 24); sed -i -r -e "s|config\['des_key'\] = .*$|config['des_key'] = \"$DES_KEY\";|g" config/config.inc.php # Initialize the db cat > /tmp/kolab-setup-my.cnf << EOF [client] host=${DB_HOST} user=root password=${DB_ROOT_PASSWORD} EOF mysql --defaults-file=/tmp/kolab-setup-my.cnf </dev/null 2>&1 || : done fi done popd roundcubemail/bin/initdb.sh --dir syncroton/docs/SQL/ || : roundcubemail/bin/initdb.sh --dir chwala/doc/SQL/ || : echo "Updating tables..." roundcubemail/bin/updatedb.sh --dir syncroton/docs/SQL/ --package syncroton || : roundcubemail/bin/updatedb.sh --dir roundcubemail/SQL/ --package roundcube || : roundcubemail/bin/updatedb.sh --dir roundcubemail/plugins/libkolab/SQL/ --package libkolab || : roundcubemail/bin/updatedb.sh --dir roundcubemail/plugins/kolab-calendar/SQL/ --package calendar-kolab || : echo "" echo "Done, starting httpd..." if [ "$1" == "testsuite" ]; then ./update-from-source.sh || : sed -i "s/?>/\$config['activesync_test_username'] = 'john@kolab.org';\n?>/" roundcubemail/config/config.inc.php sed -i "s/?>/\$config['activesync_test_password'] = 'simple123';\n?>/" roundcubemail/config/config.inc.php sed -i -r -e "s/config\['activesync_init_subscriptions'\] =.*$/config['activesync_init_subscriptions'] = 0;/g" roundcubemail/config/kolab_syncroton.inc.php sed -i -r -e "s/config\['activesync_multifolder_blacklist_event'\] =.*$/config['activesync_multifolder_blacklist_event'] = array('windowsoutlook');/g" roundcubemail/config/kolab_syncroton.inc.php sed -i -r -e "s/config\['activesync_multifolder_blacklist_task'\] =.*$/config['activesync_multifolder_blacklist_task'] = array('windowsoutlook');/g" roundcubemail/config/kolab_syncroton.inc.php sed -i -r -e "s/config\['activesync_multifolder_blacklist_contact'\] =.*$/config['activesync_multifolder_blacklist_contact'] = array('windowsoutlook');/g" roundcubemail/config/kolab_syncroton.inc.php pushd syncroton php -S localhost:8000 & pushd tests php \ -dmemory_limit=-1 \ ../vendor/bin/phpunit \ --verbose \ --testsuite Sync +elif [ "$1" == "phpstan" ]; then + ./update-from-source.sh || : + php -dmemory_limit=-1 vendor/bin/phpstan analyse elif [ "$1" == "quicktest" ]; then pushd syncroton/tests php \ -dmemory_limit=-1 \ ../vendor/bin/phpunit \ --verbose \ --testsuite Unit elif [ "$1" == "shell" ]; then exec /bin/bash else /usr/sbin/php-fpm exec httpd -DFOREGROUND fi