1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 09:04:12 +02:00

cleanup submodule

This commit is contained in:
Robin Appelman 2021-03-12 22:36:53 +01:00
commit 677383ab5a
28 changed files with 574 additions and 1 deletions

@ -1 +0,0 @@
Subproject commit 2f75a115ed8964225cb158ce43474ee270bf1b27

View file

@ -0,0 +1 @@
.git

3
images/haze/.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
*.tar.bz2
*.tar.bz2.asc
.vagrant/

33
images/haze/Dockerfile Normal file
View file

@ -0,0 +1,33 @@
FROM icewind1991/haze-php:7.4
MAINTAINER Robin Appelman <robin@icewind.nl>
# MAINTAINER Robin Schneider <ypid@riseup.net>
# MAINTAINER silvio <silvio@port1024.net>
# MAINTAINER Josh Chaney <josh@chaney.io>
RUN DEBIAN_FRONTEND=noninteractive ;\
apt-get update && \
apt-get install --assume-yes \
cron \
redis-server \
smbclient \
sudo \
wget \
attr \
git \
neovim \
nano
RUN wget https://phar.phpunit.de/phpunit-8.phar -O /usr/local/bin/phpunit.phar
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/s3.php configs/swift.php configs/swiftv3.php configs/azure.php configs/config.php /root/
ADD configs/nginx-app.conf /etc/nginx/
RUN mkdir --parent /var/log/cron
ADD configs/cron.conf /etc/oc-cron.conf
RUN crontab /etc/oc-cron.conf
ADD misc/bootstrap.sh misc/occ misc/tests misc/phpunit misc/install misc/occ misc/integration /usr/local/bin/
ENV WEBROOT /var/www/html
ENTRYPOINT ["bootstrap.sh"]

View file

@ -0,0 +1,9 @@
<?php
$AUTOCONFIG = [
'dbname' => 'haze',
'dbhost' => 'pgsql',
'dbuser' => 'haze',
'dbpass' => 'haze',
'dbtype' => 'pgsql'
];

View file

@ -0,0 +1,9 @@
<?php
$AUTOCONFIG = [
'dbname' => 'haze',
'dbhost' => 'mysql',
'dbuser' => 'haze',
'dbpass' => 'haze',
'dbtype' => 'mysql'
];

View file

@ -0,0 +1,9 @@
<?php
$AUTOCONFIG = [
'dbname' => 'xe',
'dbhost' => 'oci',
'dbuser' => 'system',
'dbpass' => 'oracle',
'dbtype' => 'oci'
];

View file

@ -0,0 +1,9 @@
<?php
$AUTOCONFIG = [
'dbname' => 'haze',
'dbhost' => 'pgsql',
'dbuser' => 'haze',
'dbpass' => 'haze',
'dbtype' => 'pgsql'
];

View file

@ -0,0 +1,10 @@
'objectstore' => [
'class' => 'OC\\Files\\ObjectStore\\Azure',
'arguments' => array(
'container' => 'test',
'account_name' => 'devstoreaccount1',
'account_key' => 'Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==',
'endpoint' => 'http://azure:10000/devstoreaccount1',
'autocreate' => true
)
],

View file

@ -0,0 +1,8 @@
<?php $CONFIG=[
'appstoreenabled' => false,
'memcache.local' => '\\OC\\Memcache\\APCu',
'memcache.distributed' => '\\OC\\Memcache\\APCu',
'memcache.locking' => '\\OC\\Memcache\\APCu',
'allow_local_remote_servers' => true,
//PLACEHOLDER
];

View file

@ -0,0 +1,2 @@
# m h dom mon dow command
*/15 * * * * sudo -u www-data php -f /var/www/owncloud/cron.php >> /var/log/cron/owncloud.log 2>&1

View file

@ -0,0 +1,10 @@
'objectstore' => [
'class' => 'OC\\Files\\ObjectStore\\Azure',
'arguments' => array(
'container' => 'test',
'account_name' => 'devstoreaccount1',
'account_key' => 'Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==',
'endpoint' => 'http://azure:10000/devstoreaccount1',
'autocreate' => true
)
],

View file

@ -0,0 +1,22 @@
# Entry 3: cn=ldaptest,dc=example,dc=org
dn: cn=ldaptest,dc=example,dc=org
cn: ldaptest
gidnumber: 500
givenname: ldap
homedirectory: /home/users/ldaptest
objectclass: inetOrgPerson
objectclass: posixAccount
objectclass: top
objectclass: organizationalPerson
sn: test
uid: ldaptest
uidnumber: 1000
# userpassword = test
userpassword: {MD5}CY9rzUYh03PK3k6DJie09g==
# Entry 4: cn=test,dc=example,dc=org
dn: cn=test,dc=example,dc=org
cn: test
gidnumber: 500
objectclass: posixGroup
objectclass: top

View file

@ -0,0 +1,19 @@
error_page 403 /core/templates/403.php;
error_page 404 /core/templates/404.php;
location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README) {
deny all;
}
location / {
## The following 2 rules are only needed with webfinger
rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
rewrite ^/.well-known/carddav /remote.php/dav/ permanent;
rewrite ^/.well-known/caldav /remote.php/dav/ permanent;
rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
try_files $uri $uri/ index.php;
}

View file

@ -0,0 +1,14 @@
'objectstore' => [
'class' => 'OC\Files\ObjectStore\S3',
'arguments' => [
// replace with your bucket
'bucket' => 'nextcloud',
'autocreate' => true,
'key' => 'dummy',
'secret' => 'dummyj',
'hostname' => 's3',
'port' => 4569,
'use_ssl' => false,
'use_path_style'=>true
],
],

View file

@ -0,0 +1,14 @@
'objectstore' => [
'class' => 'OC\Files\ObjectStore\Swift',
'arguments' => [
// replace with your bucket
'bucket' => 'nextcloud',
'autocreate' => true,
'username' => 'swift',
'password' => 'swift',
'tenantName' => 'service',
'region' => 'regionOne',
'url' => 'http://keystone:5000/v2.0',
'serviceName' => 'swift',
],
],

View file

@ -0,0 +1,27 @@
'objectstore' => [
'class' => 'OC\Files\ObjectStore\Swift',
'arguments' => [
// replace with your bucket
'bucket' => 'nextcloud',
'autocreate' => true,
'user' => [
'name' => 'swift',
'password' => 'swift',
'domain' => [
'name' => 'default',
]
],
'scope' => [
'project' => [
'name' => 'service',
'domain' => [
'name' => 'default',
],
],
],
'tenantName' => 'service',
'region' => 'regionOne',
'url' => 'http://keystone:5000/v3',
'serviceName' => 'swift',
],
],

60
images/haze/misc/bootstrap.sh Executable file
View file

@ -0,0 +1,60 @@
#!/bin/sh
touch /var/log/nginx/access.log
touch /var/log/nginx/error.log
touch /var/log/cron/owncloud.log
cp /root/config.php /var/www/html/config/config.php
if [ "$SQL" = "mysql" ]
then
cp /root/autoconfig_mysql.php /var/www/html/config/autoconfig.php
fi
if [ "$SQL" = "pgsql" ]
then
cp /root/autoconfig_pgsql.php /var/www/html/config/autoconfig.php
fi
if [ "$SQL" = "oci" ]
then
cp /root/autoconfig_oci.php /var/www/html/config/autoconfig.php
fi
UID=${UID:-www-data}
GID=${GID:-www-data}
echo "Running as $UID:$GID"
chown -R $UID:$GID /var/www/html/data /var/www/html/config
chown $UID:$GID /var/www/html/core/skeleton /var/www/html/build/integration/vendor /var/www/html/build/integration/composer.lock /var/www/html/build/integration/output /var/www/html/build/integration/work /var/www/html/core/skeleton /var/www/.composer/cache /var/www/html/apps/spreed/tests/integration/vendor/composer
echo "{}" > /var/www/html/build/integration/composer.lock
echo "Starting server using $SQL database…"
tail --follow --retry /var/log/nginx/*.log /var/log/cron/owncloud.log &
if [ -n "$S3" ]
then
sed -i '/\/\/PLACEHOLDER/ r /root/s3.php' /var/www/html/config/config.php
fi
if [ -n "$SWIFT" ]
then
sed -i '/\/\/PLACEHOLDER/ r /root/swift.php' /var/www/html/config/config.php
fi
if [ -n "$SWIFTV3" ]
then
sed -i '/\/\/PLACEHOLDER/ r /root/swiftv3.php' /var/www/html/config/config.php
fi
if [ -n "$AZURE" ]
then
sed -i '/\/\/PLACEHOLDER/ r /root/azure.php' /var/www/html/config/config.php
fi
/usr/sbin/cron -f &
/usr/bin/redis-server &
/usr/local/bin/bootstrap-nginx.sh

18
images/haze/misc/install Executable file
View file

@ -0,0 +1,18 @@
#!/bin/sh
USER=$1
PASSWORD=$2
if [ -z "$USER" ] || [ -z "$PASSWORD" ]; then
echo "Usage: install \$USER \$PASSWORD"
exit;
fi
cd $WEBROOT
if [ "$SQL" = "oci" ]; then
# oracle is a special snowflake
occ maintenance:install --admin-user=$USER --admin-pass=$PASSWORD --database=$SQL --database-name=xe --database-host=$SQL --database-user=system --database-pass=oracle
else
occ maintenance:install --admin-user=$USER --admin-pass=$PASSWORD --database=$SQL --database-name=haze --database-host=$SQL --database-user=haze --database-pass=haze
fi;

4
images/haze/misc/integration Executable file
View file

@ -0,0 +1,4 @@
#!/bin/sh
cd $WEBROOT/build/integration
sudo -u www-data ./run.sh "$@"

23
images/haze/misc/nccomposer Executable file
View file

@ -0,0 +1,23 @@
#!/bin/bash
SQL=sqlite
PHP_VERSION=7
EXTRA_ARG=""
WORKDIR="/tmp/oc-docker"
echo "Starting servers"
CONTAINERS=`ncserver $SQL $PHP_VERSION $EXTRA_ARG | tail -2 | head -1`
IFS=',' read -a CONTAINERS <<< "$CONTAINERS"
echo "Composer install"
docker exec ${CONTAINERS[0]} composer install
docker exec ${CONTAINERS[0]} composer run $@
docker exec ${CONTAINERS[0]} git clean -fd lib/composer > /dev/null
docker exec ${CONTAINERS[0]} git checkout lib/composer > /dev/null
docker rm -f ${CONTAINERS[0]}
sudo rm -rf $WORKDIR/${CONTAINERS[0]}

24
images/haze/misc/ncfmt Executable file
View file

@ -0,0 +1,24 @@
#!/bin/bash
SQL=sqlite
PHP_VERSION=7
EXTRA_ARG=""
WORKDIR="/tmp/oc-docker"
echo "Starting servers"
CONTAINERS=`ncserver $SQL $PHP_VERSION $EXTRA_ARG | tail -2 | head -1`
IFS=',' read -a CONTAINERS <<< "$CONTAINERS"
echo "Composer install"
docker exec ${CONTAINERS[0]} composer install
echo "Format"
docker exec ${CONTAINERS[0]} composer run cs:fix $@
docker exec ${CONTAINERS[0]} git clean -fd lib/composer
docker exec ${CONTAINERS[0]} git checkout lib/composer
docker rm -f ${CONTAINERS[0]}
sudo rm -rf $WORKDIR/${CONTAINERS[0]}

32
images/haze/misc/ncintegration Executable file
View file

@ -0,0 +1,32 @@
#!/bin/bash
SQL=$1
PHP_VERSION=$2
shift
shift
echo "Starting servers"
CONTAINERS=`ncserver $SQL $PHP_VERSION | tail -2 | head -1`
IFS=',' read -a CONTAINERS <<< "$CONTAINERS"
echo "Waiting for things to settle"
if [ "$SQL" = "" ] || [ "$SQL" = "sqlite" ]; then
sleep 2 # less servers to wait for
elif [ "$SQL" = "oci" ]; then
sleep 30 # oracle is always a bit lazy
else
sleep 15
fi
echo "Installing"
docker exec ${CONTAINERS[0]} install admin admin
echo "Starting tests"
docker exec -t ${CONTAINERS[0]} integration $@
echo "Cleaning up"
docker kill ${CONTAINERS[0]} ${CONTAINERS[1]}
docker rm ${CONTAINERS[0]} ${CONTAINERS[1]}

132
images/haze/misc/ncserver Executable file
View file

@ -0,0 +1,132 @@
#!/bin/bash
OC_SOURCE="/srv/http/owncloud"
WORKDIR="/tmp/oc-docker"
HOST_IP=$(ip -4 route get 8.8.8.8 | awk {'print $7'} | tr -d '\n')
DIR="$( cd "$( dirname $( dirname $( realpath "${BASH_SOURCE[0]}" ) ) )" && pwd )"
if [ -f "$DIR/.env" ]; then
export $(cat "$DIR/.env" | grep -v ^# | xargs)
fi
SQL=$1
PORT=`python -c 'import socket; s=socket.socket(); s.bind(("", 0)); print(s.getsockname()[1]); s.close()'`
NAME="oc-$PORT";
SQL_PASS=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c32;echo;`
mkdir -p "$WORKDIR/$NAME/data"
mkdir -p "$WORKDIR/$NAME/config"
mkdir -p "$WORKDIR/$NAME/data-autotest"
mkdir -p "$WORKDIR/$NAME/skeleton"
mkdir -p "$WORKDIR/$NAME/integration"
mkdir -p "$WORKDIR/$NAME/integration/output"
mkdir -p "$WORKDIR/$NAME/integration/work"
mkdir -p "$WORKDIR/$NAME/integration/vendor"
mkdir -p "$WORKDIR/$NAME/spreed/integration/vendor"
touch "$WORKDIR/$NAME/integration/composer.lock"
touch "$WORKDIR/$NAME/config/CAN_INSTALL"
touch "$WORKDIR/$NAME/phpunit-cache"
mkdir -p "$WORKDIR/composer/cache"
PHP_VERSION=$2
PHP_VERSION=${PHP_VERSION:-5}
if [ "$PHP_VERSION" != "5" ] && [ "$PHP_VERSION" != "7" ]; then
echo "invalid php version"
exit
fi;
# remove sql and php version from args
shift
shift
LINK=""
EXTRA_ENV="-e XDEBUG_CONFIG=client_host=$HOST_IP -e PHP_IDE_CONFIG=serverName=docker"
EXTRA_CONTAINERS=""
LINK_BLACKFIRE=""
for arg in "$@"
do
if [ "$arg" = "s3" ]; then
docker run -d --name "$NAME-s3" -e DEBUG=1 -e SERVICES=s3:4569 localstack/localstack:0.10.9
LINK="$LINK --link $NAME-s3:s3"
EXTRA_CONTAINERS="$EXTRA_CONTAINERS,$NAME-s3"
EXTRA_ENV="$EXTRA_ENV -e S3=1"
sleep 1
fi
if [ "$arg" = "swift" ] || [ "$arg" = "swiftv2" ]; then
docker run --name "$NAME-swift" -d icewind1991/dockswift:nextcloud-ci
LINK="$LINK --link $NAME-swift:swift --link $NAME-swift:keystone --link $NAME-swift:dockswift"
EXTRA_CONTAINERS="$EXTRA_CONTAINERS,$NAME-swift"
EXTRA_ENV="$EXTRA_ENV -e SWIFT=1"
fi
if [ "$arg" = "swiftv3" ]; then
docker run --name "$NAME-swift" -d icewind1991/dockswift:nextcloud-ci
LINK="$LINK --link $NAME-swift:swift --link $NAME-swift:keystone --link $NAME-swift:dockswift"
EXTRA_CONTAINERS="$EXTRA_CONTAINERS,$NAME-swift"
EXTRA_ENV="$EXTRA_ENV -e SWIFTV3=1"
fi
if [ "$arg" = "azure" ]; then
docker run --name "$NAME-azure" -d arafato/azurite
LINK="$LINK --link $NAME-azure:azure"
EXTRA_CONTAINERS="$EXTRA_CONTAINERS,$NAME-azure"
EXTRA_ENV="$EXTRA_ENV -e AZURE=1"
fi
if [ "$arg" = "blackfire" ]; then
BLACKFIRE_RUNNING=$(docker inspect --format="{{ .State.Running }}" blackfire 2> /dev/null)
BLACKFIRE_EXIT_CODE=$?
if [ -z "$BLACKFIRE_SERVER_TOKEN" ] && [ $BLACKFIRE_EXIT_CODE -eq 1 ]; then # we either need the blackfire config or already have an existing container
echo "Set \$BLACKFIRE_SERVER_TOKEN and \$BLACKFIRE_SERVER_ID to enable blackfire integration (https://blackfire.io/docs/integrations/docker)"
else
# ensure blackfire agent is running
if [ $BLACKFIRE_EXIT_CODE -eq 1 ]; then
docker run --name="blackfire" -d -e BLACKFIRE_SERVER_ID=$BLACKFIRE_SERVER_ID -e BLACKFIRE_SERVER_TOKEN=$BLACKFIRE_SERVER_TOKEN blackfire/blackfire
elif [ "$BLACKFIRE_RUNNING" == "false" ]; then
docker start blackfire
fi;
sleep 5
BLACKFIRE_RUNNING=$(docker inspect --format="{{ .State.Running }}" blackfire 2> /dev/null)
if [ "$BLACKFIRE_RUNNING" == "true" ]; then
LINK="$LINK --link blackfire:blackfire"
fi;
fi;
fi
if [ "$arg" = "ldap" ]; then
ADMIN_PORT=$((PORT + 1))
docker run --name $NAME-ldap -e LDAP_ADMIN_PASSWORD="admin" -v $DIR/configs/ldap:/container/service/slapd/assets/config/bootstrap/ldif/custom -d osixia/openldap:1.4.0 --copy-service
docker run --name $NAME-ldapadmin --link $NAME-ldap:ldap -p $ADMIN_PORT:443 -e PHPLDAPADMIN_LDAP_HOSTS=ldap -d osixia/phpldapadmin:0.9.0
LINK="$LINK --link $NAME-ldap:ldap"
EXTRA_CONTAINERS="$EXTRA_CONTAINERS,$NAME-ldap,$NAME-ldapadmin"
EXTRA_ENV="$EXTRA_ENV -e LDAP=1"
echo "ldapadmin: https://localhost:${ADMIN_PORT}/"
fi
done
WEBROOT="/var/www/html"
DATAROOT="$WORKDIR/$NAME"
VOLUMES="-v $OC_SOURCE:$WEBROOT -v $DATAROOT/data:$WEBROOT/data -v $DATAROOT/config:$WEBROOT/config -v $DATAROOT/data-autotest:$WEBROOT/data-autotest -v $DATAROOT/skeleton:$WEBROOT/core/skeleton/ -v $OC_SOURCE/core/skeleton/welcome.txt:$WEBROOT/core/skeleton/welcome.txt:ro -v $DATAROOT/integration/vendor:$WEBROOT/build/integration/vendor -v $DATAROOT/integration/work:$WEBROOT/build/integration/work -v $DATAROOT/integration/output:$WEBROOT/build/integration/output -v $DATAROOT/integration/composer.lock:$WEBROOT/build/integration/composer.lock -v $WORKDIR/composer/cache:/var/www/.composer/cache -v $DATAROOT/phpunit-cache:$WEBROOT/tests/.phpunit.result.cache -v $WORKDIR/$NAME/spreed/integration/vendor:/var/www/html/apps/spreed/tests/integration/vendor"
DOCKER_IMAGE="icewind1991/nextcloud-dev:$PHP_VERSION"
#DOCKER_IMAGE="nc"
VOLUMES="$VOLUMES -v /home/robin/Pictures:/Pictures"
if [ "$SQL" = "mysql" ]; then
docker run --name "$NAME-mysql" -e MYSQL_ROOT_PASSWORD=$SQL_PASS -e MYSQL_PASSWORD=owncloud -e MYSQL_USER=owncloud -e MYSQL_DATABASE=owncloud -d mariadb:10
docker run --name $NAME -d -p $PORT:80 --link "$NAME-mysql:mysql" $LINK $EXTRA_ENV -e SQL=mysql $VOLUMES $DOCKER_IMAGE
echo "$NAME,$NAME-mysql$EXTRA_CONTAINERS"
elif [ "$SQL" = "pgsql" ]; then
docker run --name "$NAME-pgsql" -e POSTGRES_PASSWORD=owncloud -e POSTGRES_USER=owncloud -e POSTGRES_DATABASE=owncloud -d postgres:latest
docker run --name $NAME -d -p $PORT:80 --link "$NAME-pgsql:pgsql" $LINK $EXTRA_ENV -e SQL=pgsql $VOLUMES $DOCKER_IMAGE
echo "$NAME,$NAME-pgsql$EXTRA_CONTAINERSl"
elif [ "$SQL" = "oci" ]; then
docker run --name "$NAME-oci" -d wnameless/oracle-xe-11g
docker run --name $NAME -d -p $PORT:80 --link "$NAME-oci:oci" $LINK $EXTRA_ENV -e SQL=oci $VOLUMES $DOCKER_IMAGE
echo "$NAME,$NAME-oci$EXTRA_CONTAINERS"
else
docker run --name $NAME -d -p $PORT:80 $LINK $EXTRA_ENV -e SQL=sqlite $VOLUMES $DOCKER_IMAGE
echo "$NAME$EXTRA_CONTAINERS"
fi
echo "Running on http://localhost:$PORT"

62
images/haze/misc/nctests Executable file
View file

@ -0,0 +1,62 @@
#!/bin/bash
SQL=$1
PHP_VERSION=$2
EXTRA=$3
EXTRA_ARG=""
WORKDIR="/tmp/oc-docker"
shift
shift
if [ "$EXTRA" = "s3" ] || [ "$EXTRA" = "swift" ] || [ "$EXTRA" = "swiftv2" ] || [ "$EXTRA" = "swiftv3" ] || [ "$EXTRA" = "azure" ]; then
shift
EXTRA_ARG=$EXTRA
fi
echo "Starting servers"
CONTAINERS=`ncserver $SQL $PHP_VERSION $EXTRA_ARG | tail -2 | head -1`
if [ -n "$EXTRA_ARG" ]; then
sleep 3;
fi
IFS=',' read -a CONTAINERS <<< "$CONTAINERS"
echo "Waiting for things to settle"
if [ "$SQL" = "" ] || [ "$SQL" = "sqlite" ]; then
sleep 2 # less servers to wait for
elif [ "$SQL" = "oci" ]; then
sleep 30 # oracle is always a bit lazy
else
sleep 15
fi
TEST_PATH=$1
if [[ "$TEST_PATH" =~ apps/([a-zA-Z_0-9]+)/? ]]; then
APP=${BASH_REMATCH[1]};
else
APP=""
fi
echo "Starting tests"
docker exec ${CONTAINERS[0]} install admin admin
if [[ "$TEST_PATH" =~ apps/files_([a-zA-Z_0-9]+)/ ]]; then
echo "Enabling app files_external"
docker exec ${CONTAINERS[0]} occ app:enable files_external --force
fi
if [ -n "$APP" ]; then
echo "Enabling app $APP"
docker exec ${CONTAINERS[0]} occ app:enable $APP --force
fi
docker exec ${CONTAINERS[0]} tests $@
echo "Cleaning up"
docker kill ${CONTAINERS[0]} ${CONTAINERS[1]}
docker rm ${CONTAINERS[0]} ${CONTAINERS[1]}
sudo rm -rf $WORKDIR/${CONTAINERS[0]}

3
images/haze/misc/occ Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
php $WEBROOT/occ "$@"

3
images/haze/misc/phpunit Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
/usr/local/bin/php -d memory_limit=512M /usr/local/bin/phpunit.phar $@

14
images/haze/misc/tests Executable file
View file

@ -0,0 +1,14 @@
#!/bin/sh
cd $WEBROOT
# we need write permissions for these
chmod 0777 tests/apps
mkdir -p $WEBROOT/apps/namespacetestapp
chmod 0777 $WEBROOT/apps/namespacetestapp
chmod 0777 tests/data
chown www-data /var/www/html/tests/.phpunit.result.cache
command="cd $WEBROOT; phpunit --configuration $WEBROOT/tests/phpunit-autotest.xml $@"
su - www-data -s /bin/sh -c "$command"