nc-restore: check btrfs command

This commit is contained in:
nachoparker 2019-04-09 18:46:02 -06:00
parent 4a0885c0a6
commit 02efd614fd
2 changed files with 2 additions and 1 deletions

View File

@ -110,7 +110,7 @@ if [[ $( ls "$TMPDIR" | wc -l ) -eq $NUMFILES ]]; then
echo "restore datadir to $DATADIR..."
mkdir -p "$DATADIR"
[[ "$( stat -fc%T "$DATADIR" )" == "btrfs" ]] && {
[[ "$( stat -fc%T "$DATADIR" )" == "btrfs" ]] && which btrfs &>/dev/null && {
rmdir "$DATADIR" || exit 1
btrfs subvolume create "$DATADIR" || exit 1
}

View File

@ -170,6 +170,7 @@ EOF
# update nc-backup
install_app nc-backup
install_app nc-restore
# create UPDATES section
updates_dir=/usr/local/bin/ncp/UPDATES