[Groonga-commit] groonga/groonga [master] rpm: create database during installing groonga-server-common package

Back to archive index

HAYASHI Kentaro null+****@clear*****
Thu Sep 6 14:13:06 JST 2012


HAYASHI Kentaro	2012-09-06 14:13:06 +0900 (Thu, 06 Sep 2012)

  New Revision: 08483fd08e710586eae799e1cde609275a3ead5e
  https://github.com/groonga/groonga/commit/08483fd08e710586eae799e1cde609275a3ead5e

  Log:
    rpm: create database during installing groonga-server-common package

  Modified files:
    packages/rpm/centos/groonga.spec.in
    packages/rpm/fedora/groonga.spec.in

  Modified: packages/rpm/centos/groonga.spec.in (+5 -0)
===================================================================
--- packages/rpm/centos/groonga.spec.in    2012-09-06 11:05:25 +0900 (3b00055)
+++ packages/rpm/centos/groonga.spec.in    2012-09-06 14:13:06 +0900 (4796247)
@@ -185,6 +185,11 @@ getent group groonga >/dev/null || groupadd -r groonga
 getent passwd groonga >/dev/null || \
        useradd -r -g groonga -d %{_localstatedir}/lib/groonga -s /sbin/nologin \
 	-c 'groonga' groonga
+if [ $1 = 1 ]; then
+	mkdir -p %{_localstatedir}/lib/groonga/db
+	groonga -n %{_localstatedir}/lib/groonga/db/db shutdown > /dev/null
+	chown -R groonga:groonga %{_localstatedir}/lib/groonga
+fi
 exit 0
 
 %post server

  Modified: packages/rpm/fedora/groonga.spec.in (+5 -0)
===================================================================
--- packages/rpm/fedora/groonga.spec.in    2012-09-06 11:05:25 +0900 (8c84636)
+++ packages/rpm/fedora/groonga.spec.in    2012-09-06 14:13:06 +0900 (0d057c2)
@@ -225,6 +225,11 @@ getent group groonga >/dev/null || groupadd -r groonga
 getent passwd groonga >/dev/null || \
        useradd -r -g groonga -d %{_localstatedir}/lib/groonga -s /sbin/nologin \
 	-c 'groonga' groonga
+if [ $1 = 1 ] ; then
+	mkdir -p %{_localstatedir}/lib/groonga/db
+	groonga -n %{_localstatedir}/lib/groonga/db/db shutdown > /dev/null
+	chown -R groonga:groonga %{_localstatedir}/lib/groonga
+fi
 exit 0
 
 %post server
-------------- next part --------------
HTML����������������������������...
下载 



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