[Groonga-commit] groonga/gcs [master] Add gcs-register-domain script

Back to archive index

null+****@clear***** null+****@clear*****
2012年 7月 4日 (水) 18:17:02 JST


Yoji SHIDARA	2012-07-04 18:17:02 +0900 (Wed, 04 Jul 2012)

  New Revision: 781c53515fa67f88c6038ed59dc43c05f49a0bbb
  https://github.com/groonga/gcs/commit/781c53515fa67f88c6038ed59dc43c05f49a0bbb

  Log:
    Add gcs-register-domain script

  Added files:
    bin/gcs-register-domain

  Added: bin/gcs-register-domain (+20 -0) 100755
===================================================================
--- /dev/null
+++ bin/gcs-register-domain    2012-07-04 18:17:02 +0900 (c597010)
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+if [ "$#" == "0" ]
+then
+  echo "Usage: $0 [domain-name]"
+  echo "Add host entries for the domain [domain-name] to /etc/hosts"
+else
+  if [ -w /etc/hosts ]
+  then
+    for domain_name in "$@"
+    do
+      echo "Registering entries for '$domain_name' to /etc/hosts"
+      echo "127.0.0.1 doc-$domain_name-00000000000000000000000000.localhost" >> /etc/hosts
+      echo "127.0.0.1 search-$domain_name-00000000000000000000000000.localhost"  >> /etc/hosts
+    done
+  else
+    echo "You don't have write access to /etc/hosts."
+    echo "Try 'sudo $0 [domain-name]'"
+  fi
+fi
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
다운로드 



Groonga-commit メーリングリストの案内
Back to archive index