Add info.sh script
This commit is contained in:
parent
3acc92b85c
commit
d1949464e2
1 changed files with 38 additions and 0 deletions
38
distillery/info.sh
Executable file
38
distillery/info.sh
Executable file
|
|
@ -0,0 +1,38 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# read the lib/shared.sh and read the slug argument.
|
||||
DISABLE_LOG=1
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
cd "$DIR"
|
||||
source "$DIR/lib/lib.sh"
|
||||
DISABLE_LOG=0
|
||||
require_slug_argument
|
||||
|
||||
|
||||
# if the site doesn't exist, I can't open a shell.
|
||||
if ! sql_bookkeep_exists "$SLUG"; then
|
||||
log_error "=> Site '$SLUG' does not exist in bookeeping table. "
|
||||
echo "I can't show info about it. "
|
||||
exit 1
|
||||
fi;
|
||||
|
||||
# Read everything from the database
|
||||
read -r INSTANCE_BASE_DIR MYSQL_DATABASE MYSQL_USER GRAPHDB_REPO GRAPHDB_USER GRAPHDB_PASSWORD <<< "$(sql_bookkeep_load "${SLUG}" "filesystem_base,sql_database,sql_user,graphdb_repository,graphdb_user,graphdb_password" | tail -n +2)"
|
||||
|
||||
GRAPHDB_HEADER="$(echo "$GRAPHDB_USER:$GRAPHDB_PASSWORD" | base64)"
|
||||
|
||||
|
||||
echo "=================================================================================="
|
||||
echo "URL: http://$INSTANCE_DOMAIN"
|
||||
echo "Base directory: ${INSTANCE_BASE_DIR}"
|
||||
log_info " => Your GraphDB details (for WissKI Salz) are: "
|
||||
echo "Read URL: http://triplestore:7200/repositories/$GRAPHDB_REPO"
|
||||
echo "Write URL: http://triplestore:7200/repositories/$GRAPHDB_REPO/statements"
|
||||
echo "Username: $GRAPHDB_USER"
|
||||
echo "Password: $GRAPHDB_PASSWORD"
|
||||
echo "Authorization Header: $GRAPHDB_HEADER"
|
||||
echo "Writable: yes"
|
||||
echo "Default Graph URI: http://$INSTANCE_DOMAIN/#"
|
||||
echo "Ontology Paths: (empty)"
|
||||
echo "SameAs property: http://www.w3.org/2002/07/owl#sameAs"
|
||||
Loading…
Add table
Add a link
Reference in a new issue