You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
718 B
36 lines
718 B
#!/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="<external 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
|
|
|
|
|
|
|