grknight    14/12/02 03:20:57

  Modified:             groonga.confd groonga.initd
  Log:
  Revbump for bug 531334 and bug 531346
  
  (Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 
67C78E1D)

Revision  Changes    Path
1.2                  app-text/groonga/files/groonga.confd

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/groonga/files/groonga.confd?rev=1.2&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/groonga/files/groonga.confd?rev=1.2&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/groonga/files/groonga.confd?r1=1.1&r2=1.2

Index: groonga.confd
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-text/groonga/files/groonga.confd,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- groonga.confd       29 Nov 2014 02:30:24 -0000      1.1
+++ groonga.confd       2 Dec 2014 03:20:57 -0000       1.2
@@ -1,12 +1,9 @@
 # Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/groonga/files/groonga.confd,v 1.1 
2014/11/29 02:30:24 grknight Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-text/groonga/files/groonga.confd,v 1.2 
2014/12/02 03:20:57 grknight Exp $
 
-# Default
-#USER=groonga
-#GROUP=groonga
-#ADDRESS=127.0.0.1
-#DATABASE=/var/lib/groonga/db/db
-#LOG_PATH=/var/log/groonga/groonga.log
-#QUERY_LOG_PATH=/var/log/groonga/query.log
-#PROTOCOL=gqtp
+#GROONGA_USER=groonga
+#GROONGA_GROUP=groonga
+#GROONGA_PID=/run/groonga/groonga.pid
+#CONFIG_FILE=/etc/groonga/groonga.conf
+DATABASE=/var/lib/groonga/db



1.2                  app-text/groonga/files/groonga.initd

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/groonga/files/groonga.initd?rev=1.2&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/groonga/files/groonga.initd?rev=1.2&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/groonga/files/groonga.initd?r1=1.1&r2=1.2

Index: groonga.initd
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-text/groonga/files/groonga.initd,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- groonga.initd       29 Nov 2014 02:30:24 -0000      1.1
+++ groonga.initd       2 Dec 2014 03:20:57 -0000       1.2
@@ -1,21 +1,21 @@
 #!/sbin/runscript
 # Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/groonga/files/groonga.initd,v 1.1 
2014/11/29 02:30:24 grknight Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-text/groonga/files/groonga.initd,v 1.2 
2014/12/02 03:20:57 grknight Exp $
+
+command=/usr/bin/groonga
+command_args="-d --pid-path ${GROONGA_PID:-/run/groonga/groonga.pid} 
--config-path=${CONFIG_FILE:-/etc/groonga/groonga.conf} ${DATABASE}"
+pidfile="${GROONGA_PID:-/run/groonga/groonga.pid}"
+start_stop_daemon_args="--quiet --user 
${GROONGA_USER:-groonga}:${GROONGA_GROUP:-groonga}"
 
 depend() {
        use net
 }
 
-start() {
-       ebegin "Starting groonga"
-       checkpath -d /run/groonga -o ${USER:-groonga}:${GROUP:-groonnga}
-       start-stop-daemon --start --quiet --exec /usr/sbin/groonga -- 
${GROONGA_OPTS}
-       eend $?
-}
-
-stop() {
-       ebegin "Stopping groonga"
-       start-stop-daemon --stop --quiet --pidfile 
/var/spool/groonga/groonga.pid
-       eend $?
+start_pre() {
+       checkpath -d /run/groonga -o 
${GROONGA_USER:-groonga}:${GROONGA_GROUP:-groonga}
+       if  [ ! -e "${DATABASE}" ] ; then
+               einfo "Creating database ${DATABASE}"
+               su -s /bin/sh -c "/usr/bin/groonga -n ${DATABASE} quit" 
${GROONGA_USER:-groonga}
+       fi
 }




Reply via email to