Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix][cli] Fix start cli error #2024

Merged
merged 6 commits into from
Nov 22, 2022
Merged
Changes from 1 commit
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
17 changes: 3 additions & 14 deletions hugegraph-dist/src/assembly/static/bin/hugegraph
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@
INSTALL_DIR=
SERVER_PORT=

${INSTALL_DIR:?"Please setting variables 'INSTALL_DIR'"}
Copy link
Member

@imbajin imbajin Nov 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😺, nice

typo `setting --> set``

${SERVER_PORT:?"Please setting variables 'SERVER_PORT'"}

BIN_DIR=$INSTALL_DIR/bin
SERVER_URL="http://localhost:${SERVER_PORT}"
DETECT_URL="$SERVER_URL/versions"

# Start the HugeGraphServer
start() {
check_variables
echo "Starting HugeGraphServer..."
# Verify if the service is running
get_status
Expand Down Expand Up @@ -75,7 +77,6 @@ start() {

# Stop the MATH
stop() {
check_variables
echo "Stopping HugeGraphServer..."
# Verify if the service is running
get_status
Expand Down Expand Up @@ -125,18 +126,6 @@ get_status() {
fi
}

check_variables() {
if [ -z "$INSTALL_DIR" ]; then
echo "Please setting variables 'INSTALL_DIR'"
exit 1
fi

if [ -z "$SERVER_PORT" ]; then
echo "Please setting variables 'SERVER_PORT'"
exit 1
fi
}

# Main logic
case "$1" in
start)
Expand Down