Skip to content

Commit

Permalink
Fix fts reinstall (#2328)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ark74 authored May 18, 2022
1 parent e3721d4 commit e90bd93
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
7 changes: 3 additions & 4 deletions apps/fulltextsearch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ debug_mode
# Must be root
root_check

# Nextcloud 18 is required.
# Nextcloud 21 is required.
lowest_compatible_nc 21

# Check if Full Text Search is already installed
Expand All @@ -49,9 +49,8 @@ else
done
# Removal Docker image
docker_prune_this "$nc_fts"
docker_prune_this "$opens_fts"
docker_prune_volume "esdata"
docker_prune_volume "fts_os-data"
docker-compose_down "$OPNSDIR/docker-compose.yml"
# Remove configuration files
rm -rf "$RORDIR"
rm -rf "$OPNSDIR"
Expand Down Expand Up @@ -98,7 +97,7 @@ install_if_not docker-compose
set_max_count
mkdir -p "$OPNSDIR"
docker pull "$opens_fts"
BCRYPT_HASH="$(docker run -it $opens_fts \
BCRYPT_HASH="$(docker run --rm -it $opens_fts \
bash -c "plugins/opensearch-security/tools/hash.sh -p $OPNSREST | tr -d ':\n' ")"

# Create configurations YML
Expand Down
12 changes: 12 additions & 0 deletions lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1697,6 +1697,18 @@ You will be given the option to abort when you hit OK."
fi
}

# Stop and remove selected docker-compose items (containers, networks, volumes) by up.
# docker-compose_down "$OPNSDIR/docker-compose.yml" (absolute path to docker-compose.yml)
docker-compose_down() {
if [ -f "$1" ]
then
cd "$(dirname "$1")"
docker-compose down --volume --rmi all
else
echo "Non-existing docker-compose file path, skipping..."
fi
}


# Update specific Docker image
# docker_update_specific 'vaultwarden' 'Vaultwarden' (docker conainter name = $1, the name in text = $2)
Expand Down

0 comments on commit e90bd93

Please sign in to comment.