rclone/fstest/testserver/init.d/TestWebdavNextcloud
Florian Klink aed77a8fb2 tree-wide: replace /bin/bash with /usr/bin/env bash
The latter is more portable, while the former only works on systems
where /bin/bash exists (or is symlinked appropriately).
2024-06-11 12:47:47 +01:00

30 lines
668 B
Bash
Executable File

#!/usr/bin/env bash
set -e
NAME=nextcloud
USER=rclone
PASS=ArmorAbleMale6
PORT=28629
. $(dirname "$0")/docker.bash
start() {
docker run --rm -d --name $NAME \
-e "SQLITE_DATABASE=nextcloud.db" \
-e "NEXTCLOUD_ADMIN_USER=rclone" \
-e "NEXTCLOUD_ADMIN_PASSWORD=$PASS" \
-e "NEXTCLOUD_TRUSTED_DOMAINS=*.*.*.*" \
-p 127.0.0.1:${PORT}:80 \
nextcloud:latest
echo type=webdav
echo url=http://127.0.0.1:${PORT}/remote.php/dav/files/$USER/
echo user=$USER
echo pass=$(rclone obscure $PASS)
echo vendor=nextcloud
echo _connect=127.0.0.1:${PORT}
}
. $(dirname "$0")/run.bash