[Groonga-commit] groonga/groonga [master] [debian] use HTTP as the default protocol.

Back to archive index

null+****@clear***** null+****@clear*****
2012年 2月 1日 (水) 18:16:10 JST


Kouhei Sutou	2012-02-01 18:16:10 +0900 (Wed, 01 Feb 2012)

  New Revision: 9bcedb155ceb0d4d04ce793c3609af08866af534

  Log:
    [debian] use HTTP as the default protocol.

  Modified files:
    packages/debian/changelog
    packages/debian/groonga-server.default
    packages/debian/groonga-server.init

  Modified: packages/debian/changelog (+1 -0)
===================================================================
--- packages/debian/changelog    2012-02-01 18:12:50 +0900 (2e9c318)
+++ packages/debian/changelog    2012-02-01 18:16:10 +0900 (d82bb7f)
@@ -1,6 +1,7 @@
 groonga (1.3.1-1) unstable; urgency=low
 
   * New upstream release.
+  * Use HTTP as the default protocol.
 
  -- Kouhei Sutou <kou****@clear*****>  Wed, 29 Feb 2012 00:00:00 +0900
 

  Modified: packages/debian/groonga-server.default (+2 -1)
===================================================================
--- packages/debian/groonga-server.default    2012-02-01 18:12:50 +0900 (c5c13de)
+++ packages/debian/groonga-server.default    2012-02-01 18:16:10 +0900 (2be5369)
@@ -2,10 +2,11 @@
 #USER=groonga
 #GROUP=groonga
 #ADDRESS=127.0.0.1
+#PORT=10041
 #DATABASE=/var/lib/groonga/db/db
 #LOG_PATH=/var/log/groonga/groonga.log
 #QUERY_LOG_PATH=/var/log/groonga/query.log
-#PROTOCOL=gqtp
+#PROTOCOL=http
 
 # Comment out this to disable groonga daemon.
 ENABLE=yes

  Modified: packages/debian/groonga-server.init (+10 -7)
===================================================================
--- packages/debian/groonga-server.init    2012-02-01 18:12:50 +0900 (be1852a)
+++ packages/debian/groonga-server.init    2012-02-01 18:16:10 +0900 (c8309fc)
@@ -18,10 +18,12 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin
 DESC="a full-text search engine and column store"
 NAME=groonga
 DAEMON=/usr/bin/$NAME
+CURL=/usr/bin/curl
 USER=groonga
 GROUP=groonga
 DATABASE=/var/lib/groonga/db/db
 ADDRESS=127.0.0.1
+PORT=10041
 PROTOCOL=
 LOG_PATH=
 QUERY_LOG_PATH=
@@ -43,6 +45,9 @@ DAEMON_ARGS="-d --pid-path ${PIDFILE}"
 if [ -n "${ADDRESS}" ]; then
     DAEMON_ARGS="${DAEMON_ARGS} -a ${ADDRESS}"
 fi
+if [ -n "${PORT}" ]; then
+    DAEMON_ARGS="${DAEMON_ARGS} --port ${PORT}"
+fi
 if [ -n "${LOG_PATH}" ]; then
     DAEMON_ARGS="${DAEMON_ARGS} --log-path ${LOG_PATH}"
 fi
@@ -154,16 +159,14 @@ do_reload() {
 }
 
 do_status() {
-    ARGS=""
-    if [ -n "${PROTOCOL}" ]; then
-	ARGS="${ARGS} --protocol ${PROTOCOL}"
+    if [ -z "${ADDRESS}" ]; then
+	ADDRESS="localhost"
     fi
-    if [ -n "${ADDRESS}" ]; then
-	ARGS="${ARGS} -c ${ADDRESS}"
+    if [ "${PROTOCOL}" = "http" ]; then
+	$CURL "http://${ADDRESS}:${PORT}/d/status"
     else
-	ARGS="${ARGS} -c localhost"
+        $DAEMON --port ${PORT} -c ${ADDRESS} status
     fi
-    $DAEMON $ARGS status
     return $?
 }
 




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