Skip to content

Commit

Permalink
WebDAV rclone: shell formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
valtri committed May 14, 2024
1 parent 4d5b441 commit 1cbd805
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions webdav-rclone-sidecar/mount.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ JOVYAN_GRP=${JOVYAN_GRP:-100}
VFS_CACHE_MODE=${VFS_CACHE_MODE:-full}

if [ ! -d "$MOUNT_PATH" ]; then
mkdir -p "$MOUNT_PATH"
chown "$JOVYAN_UID:$JOVYAN_GRP" "$MOUNT_PATH"
mkdir -p "$MOUNT_PATH"
chown "$JOVYAN_UID:$JOVYAN_GRP" "$MOUNT_PATH"
fi

# wait to be killed
do_umount () {
fusermount3 -u -z "$MOUNT_PATH"
exit $?
do_umount() {
fusermount3 -u -z "$MOUNT_PATH"
exit $?
}

trap "do_umount" INT
Expand All @@ -37,6 +37,6 @@ rclone config create --non-interactive webdav-fs webdav "${args[@]}" "$@"
# uid: unix owner
# gid: unix group
# vfs-cache-mode: random access and cache
IFS=" " read -r -a mount_opts <<< "$MOUNT_OPTS"
IFS=" " read -r -a mount_opts <<<"$MOUNT_OPTS"
mount_opts+=("--vfs-cache-mode=$VFS_CACHE_MODE")
rclone mount webdav-fs:/ "$MOUNT_PATH" --allow-non-empty --allow-other --uid="$JOVYAN_UID" --gid="$JOVYAN_GRP" "${mount_opts[@]}"

0 comments on commit 1cbd805

Please sign in to comment.