imbajin commented on code in PR #2403:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2403#discussion_r1441301947


##########
hugegraph-server/hugegraph-dist/src/assembly/static/bin/util.sh:
##########
@@ -268,14 +275,19 @@ function get_ip() {
 function download() {
     local path=$1
     local link_url=$2

Review Comment:
   `url` is fine? or use `download_url`



##########
hugegraph-server/hugegraph-dist/src/assembly/static/bin/set-auth.sh:
##########


Review Comment:
   maybe `enable-auth.sh` is better?



##########
hugegraph-server/hugegraph-dist/src/assembly/static/bin/util.sh:
##########
@@ -131,6 +131,7 @@ function wait_for_startup() {
     local stop_s=$((now_s + timeout_s))
 
     local status
+    local error_file_name="wait_for_startup_error.txt"

Review Comment:
   ```suggestion
       local error_file_name="start_error.txt"
   ```
   
   or `startup_error`?



##########
hugegraph-server/hugegraph-dist/src/assembly/static/bin/set-auth.sh:
##########
@@ -0,0 +1,52 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with this
+# work for additional information regarding copyright ownership. The ASF
+# licenses this file to You under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+
+function abs_path() {
+    SOURCE="${BASH_SOURCE[0]}"
+    while [[ -h "$SOURCE" ]]; do
+        DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)"
+        SOURCE="$(readlink "$SOURCE")"
+        [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
+    done
+    cd -P "$(dirname "$SOURCE")" && pwd
+}
+
+BIN=$(abs_path)
+TOP="$(cd "${BIN}"/../ && pwd)"
+CONF="$TOP/conf"
+
+GREMLIN_SERVER_CONF="gremlin-server.yaml"
+REST_SERVER_CONF="rest-server.properties"
+GRAPH_CONF="hugegraph.properties"
+
+# make a backup
+cp "${CONF}/${GREMLIN_SERVER_CONF}" "${CONF}/${GREMLIN_SERVER_CONF}.bak"
+cp "${CONF}/${REST_SERVER_CONF}" "${CONF}/${REST_SERVER_CONF}.bak"
+cp "${CONF}/graphs/${GRAPH_CONF}" "${CONF}/graphs/${GRAPH_CONF}.bak"

Review Comment:
   if we also provide the script for users to use, consider create a backup dir 
& put them into it together?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to