mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
improve btrfs/ext checks
Signed-off-by: nachoparker <nacho@ownyourbits.com>
This commit is contained in:
parent
f3e3b01ab5
commit
311cd2b769
@ -33,7 +33,7 @@ DATADIR="$( grep datadirectory nextcloud/config/config.php | awk '{ print $3 }'
|
||||
[[ -d /var/www/nextcloud-old ]] && { echo "Nextcloud backup directory found. Interrupted or already running installation?"; exit 1; }
|
||||
[[ -d /var/www/nextcloud ]] || { echo "Nextcloud directory not found" ; exit 1; }
|
||||
[[ -d "$DATADIR" ]] || { echo "Nextcloud data directory not found" ; exit 1; }
|
||||
[[ "$(stat -fc%T "$BASEDIR")" == "btrfs" ]] && { echo "BTRFS not supported" ; exit 1; }
|
||||
grep -q "btrfs" <(stat -fc%T "$BASEDIR") && { echo "BTRFS not supported" ; exit 1; }
|
||||
|
||||
# check version
|
||||
####################
|
||||
|
||||
@ -111,7 +111,7 @@ if [[ $( ls "$TMPDIR" | wc -l ) -eq $NUMFILES ]]; then
|
||||
echo "restore datadir to $DATADIR..."
|
||||
|
||||
mkdir -p "$DATADIR"
|
||||
[[ "$( stat -fc%T "$DATADIR" )" == "btrfs" ]] && which btrfs &>/dev/null && {
|
||||
grep -q "btrfs" <(stat -fc%T "$DATADIR") && which btrfs &>/dev/null && {
|
||||
rmdir "$DATADIR" || exit 1
|
||||
btrfs subvolume create "$DATADIR" || exit 1
|
||||
}
|
||||
|
||||
@ -8,6 +8,8 @@ source /usr/local/etc/library.sh # sets NCLATESTVER PHPVER RELEASE
|
||||
|
||||
# all images
|
||||
|
||||
install_app nc-restore
|
||||
|
||||
# docker images only
|
||||
[[ -f /.docker-image ]] && {
|
||||
:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user