#!/bin/bash

# This the base template suitable for having a standalone running SecHub admin ui.
# The sechub-developertools-x.y.z.jar can be downloaded
# from the latest SecHub server release on github.com.
# Alternatively the jar file can be created manually:
# - call ./gradlew :sechub-developertools:bootJar
# - the created file is: build/libs/sechub-developertools-0.0.0.jar
#
# Use:
# - copy this script to a dedicated folder and make it executable: chmod a+x
# - edit the copied script and define your system properties below
# - copy sechub-developertools-x.y.z.jar to the folder
# - call the script and the SecHub Developer Admin UI will open

export SECHUB_ADMIN_USERID=int-test_superadmin # your admin user id
export SECHUB_ADMIN_APITOKEN=int-test_superadmin-pwd
export SECHUB_ADMIN_SERVER=localhost # server IP or name
export SECHUB_ADMIN_SERVER_PORT=8443

export SECHUB_WAITTIME_DEFAULT=60 # so 60 seconds

export SECHUB_ADMIN_SERVER_PROTOCOL=https

export SECHUB_ENABLE_INTEGRATION_TESTSERVER_MENU=true
export SECHUB_DISABLE_CONFIRMATIONS=true
export SECHUB_CHECK_STATUS_ON_STARTUP=false

export SECHUB_ADMIN_ENVIRONMENT="localhost" # Use : "localhost", no color. Dedicated menu colors for: "PROD", "INT" or "TESTxyz"

export SECHUB_MASS_OPERATION_PARENTDIRECTORY="$HOME/.sechub/inttest/mass-operations" # mass operation directory (containign csv files )
export SECHUB_TARGETFOLDER_FOR_SECHUB_CLIENT_SCAN="$HOME/.sechub/test-targetfolder1"

export SECHUB_PATH_TO_SECHUB_CLIENT_BINARY="/usr/local/bin/sechub"
export SECHUB_TRUSTALL_DENIED=false; # change this for other environments!

echo "-------------------------------------------------------------"
echo "Starting SecHub Developer Admin UI"
echo "-------------------------------------------------------------"
echo "- SECHUB_TARGETFOLDER_FOR_SECHUB_CLIENT_SCAN:$SECHUB_TARGETFOLDER_FOR_SECHUB_CLIENT_SCAN"
echo "- SECHUB_PATH_TO_SECHUB_CLIENT_BINARY:       $SECHUB_PATH_TO_SECHUB_CLIENT_BINARY"
java -jar sechub-developertools-*.jar
