19 lines
512 B
Bash
Executable File
19 lines
512 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -xeuo pipefail
|
|
IFS=$'\n\t'
|
|
|
|
if [[ -x "$(command -v podman)" ]]; then
|
|
CONTAINER_RUNTIME="$(command -v podman 2> /dev/null)"
|
|
elif [[ -x "$(command -v docker)" ]]; then
|
|
CONTAINER_RUNTIME="$(command -v docker 2> /dev/null)"
|
|
else
|
|
echo "Container runtime (docker/podman) not found!"
|
|
exit 1
|
|
fi
|
|
|
|
export APACHE_RUN_USER=33
|
|
export APACHE_RUN_GROUP=0
|
|
|
|
$CONTAINER_RUNTIME exec --user "${APACHE_RUN_USER}:${APACHE_RUN_GROUP}" nextcloud bash -c 'cd /var/www/html/custom_apps/upschooling && make test'
|