nc-datadir.sh: Prevent btrfs commands from being executed on docker

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
This commit is contained in:
Tobias K 2023-01-04 22:24:48 +01:00 committed by Tobias Knöppler
parent 0c3ac35e39
commit 731e25e36b
No known key found for this signature in database
GPG Key ID: 3510056072886A8F

View File

@ -106,7 +106,7 @@ configure()
echo "moving data directory from ${SRCDIR} to ${BASEDIR}..."
# use subvolumes, if BTRFS
[[ "$(stat -fc%T "${BASEDIR}")" == "btrfs" ]] && {
[[ "$(stat -fc%T "${BASEDIR}")" == "btrfs" ]] && ! is_docker && {
echo "BTRFS filesystem detected"
rmdir "${BASEDIR}"
btrfs subvolume create "${BASEDIR}"