[Groonga-commit] droonga/droonga-engine at 69a1d09 [master] Accept host name given as HOST environment variable

Back to archive index

YUKI Hiroshi null+****@clear*****
Tue Sep 16 12:17:50 JST 2014


YUKI Hiroshi	2014-09-16 12:17:50 +0900 (Tue, 16 Sep 2014)

  New Revision: 69a1d0959e95ade7e167b3831617d1e6d24a37f6
  https://github.com/droonga/droonga-engine/commit/69a1d0959e95ade7e167b3831617d1e6d24a37f6

  Message:
    Accept host name given as HOST environment variable

  Modified files:
    install.sh

  Modified: install.sh (+8 -1)
===================================================================
--- install.sh    2014-09-16 12:14:57 +0900 (85c7849)
+++ install.sh    2014-09-16 12:17:50 +0900 (5ba6d05)
@@ -24,12 +24,15 @@ SCRIPT_URL=https://raw.githubusercontent.com/droonga/$NAME/master/install
 REPOSITORY_URL=https://github.com/droonga/$NAME.git
 USER=$NAME
 DROONGA_BASE_DIR=/home/$USER/droonga
-HOST=127.0.0.1
 
 if [ "$VERSION" = "" ]; then
   export VERSION=release
 fi
 
+if [ "$HOST" = "" ]; then
+  export HOST="Auto Detect"
+fi
+
 case $(uname) in
   Darwin|*BSD|CYGWIN*) sed="sed -E" ;;
   *)                   sed="sed -r" ;;
@@ -96,6 +99,10 @@ get_addresses_with_interface() {
 }
 
 determine_hostname() {
+  if [ "$HOST" != "Auto Detect" ]; then
+    return 0
+  fi
+
   if [ $(get_addresses_with_interface | wc -l) -eq 1 ]; then
     HOST=$(get_addresses_with_interface | cut -d " " -f 1)
     return 0
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index