You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
502 B
17 lines
502 B
#!/bin/bash |
|
set -euo pipefail |
|
ENV=/opt/stacks/geonet-console/.env |
|
upsert() { |
|
local key="$1" |
|
local value="$2" |
|
if grep -q "^${key}=" "$ENV"; then |
|
sed -i "s|^${key}=.*|${key}=${value}|" "$ENV" |
|
else |
|
echo "${key}=${value}" >> "$ENV" |
|
fi |
|
} |
|
upsert PROJECT_SEARCH_OAUTH_CLIENT_ID "a2072649-3215-4701-af9f-d89d13875105" |
|
upsert PROJECT_SEARCH_OAUTH_SCOPE "project-search:read" |
|
grep -E '^(PROJECT_SEARCH_OAUTH_|OLLAMA_)' "$ENV" |
|
cd /opt/stacks/geonet-console |
|
docker compose restart geonet-console
|
|
|