Skip to content

Commit 311cd2b

Browse files
committed
improve btrfs/ext checks
Signed-off-by: nachoparker <nacho@ownyourbits.com>
1 parent f3e3b01 commit 311cd2b

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

bin/ncp-update-nc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ DATADIR="$( grep datadirectory nextcloud/config/config.php | awk '{ print $3 }'
3333
[[ -d /var/www/nextcloud-old ]] && { echo "Nextcloud backup directory found. Interrupted or already running installation?"; exit 1; }
3434
[[ -d /var/www/nextcloud ]] || { echo "Nextcloud directory not found" ; exit 1; }
3535
[[ -d "$DATADIR" ]] || { echo "Nextcloud data directory not found" ; exit 1; }
36-
[[ "$(stat -fc%T "$BASEDIR")" == "btrfs" ]] && { echo "BTRFS not supported" ; exit 1; }
36+
grep -q "btrfs" <(stat -fc%T "$BASEDIR") && { echo "BTRFS not supported" ; exit 1; }
3737

3838
# check version
3939
####################

bin/ncp/BACKUPS/nc-restore.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ if [[ $( ls "$TMPDIR" | wc -l ) -eq $NUMFILES ]]; then
111111
echo "restore datadir to $DATADIR..."
112112
113113
mkdir -p "$DATADIR"
114-
[[ "$( stat -fc%T "$DATADIR" )" == "btrfs" ]] && which btrfs &>/dev/null && {
114+
grep -q "btrfs" <(stat -fc%T "$DATADIR") && which btrfs &>/dev/null && {
115115
rmdir "$DATADIR" || exit 1
116116
btrfs subvolume create "$DATADIR" || exit 1
117117
}

updates/1.40.0.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ source /usr/local/etc/library.sh # sets NCLATESTVER PHPVER RELEASE
88

99
# all images
1010

11+
install_app nc-restore
12+
1113
# docker images only
1214
[[ -f /.docker-image ]] && {
1315
:

0 commit comments

Comments
 (0)