#!/bin/sh DATADIR=$HOME/vol/nextcloud/data FILEDIR=$HOME/vol/nextcloud/files if [ -f env ]; then . ./env else echo "Need env like:" echo USE_HOST="" exit 1 fi if [ ! -d $DATADIR ]; then mkdir -p $DATADIR/etc $DATADIR/ncconfig cp data/ncconfig/* $DATADIR/ncconfig/ sed -e "s/example.domain.com/$USE_HOST/" \ data/ncconfig/host.config.php \ > $DATADIR/ncconfig/host.config.php fi if [ ! -d $FILEDIR ]; then mkdir -p $FILEDIR fi mkdir -p assets/nextcloud cd assets/nextcloud if [ -e latest.zip ]; then echo Available Nextcloud files: ls -lF else wget --progress=dot:giga https://download.nextcloud.com/server/releases/latest.zip fi