Skip to content
This repository was archived by the owner on Mar 5, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions actions/core/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ core_configure ()

core_configure_database

core_configure_log_level

__core_configure_post

configured=true
Expand All @@ -31,6 +33,8 @@ core_configure ()

core_configure_database

core_configure_log_level

__core_configure_post

configured=true
Expand Down Expand Up @@ -63,6 +67,8 @@ __core_configure_post ()

__core_configure_network ()
{
ascii

info "Which network would you like to configure?"

validNetworks=("mainnet" "devnet" "testnet")
Expand Down
2 changes: 2 additions & 0 deletions actions/core/configure/database.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

core_configure_database ()
{
ascii

local envFile="${CORE_DATA}/.env"

. "$envFile"
Expand Down
34 changes: 32 additions & 2 deletions actions/core/configure/log-level.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,43 @@

core_configure_log_level ()
{
ascii

local envFile="${CORE_DATA}/.env"

. "$envFile"

read -p "Enter the log level (debug, info, warning, error), or press ENTER for the default [$ARK_LOG_LEVEL]: " inputLevel
info "Which log level would you like to configure?"

local validLevels=("debug" "info" "warning" "error")

local inputLevel=$ARK_LOG_LEVEL

select opt in "${validLevels[@]}"; do
case "$opt" in
"debug")
inputLevel=debug
break
;;
"info")
inputLevel=info
break
;;
"warning")
inputLevel=warning
break
;;
"error")
inputLevel=error
break
;;
*)
echo "Invalid option $REPLY"
;;
esac
done

if [[ ! -z "$inputLevel" ]]; then
if [[ "$ARK_LOG_LEVEL" != "$inputLevel" ]]; then
sed -i -e "s/ARK_LOG_LEVEL=$ARK_LOG_LEVEL/ARK_LOG_LEVEL=$inputLevel/g" "$envFile"
fi

Expand Down
2 changes: 2 additions & 0 deletions actions/core/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ core_install ()

core_configure

ascii

success "Installed Ark Core!"
fi
}
2 changes: 2 additions & 0 deletions modules/database.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ database_destroy ()

database_create ()
{
ascii

heading "Creating Database..."

wait_to_continue
Expand Down