]> git.pld-linux.org Git - packages/mongodb.git/commitdiff
- initscript restart macros
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 28 Oct 2010 08:46:30 +0000 (08:46 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    mongodb.spec -> 1.7

mongodb.spec

index 8e1b332b50e4677e9e22a46f2f92b7b297833ac9..4fbf5bad3d19f25dcce396e0fa82e37e3f51bb9b 100644 (file)
@@ -17,6 +17,7 @@ BuildRequires:        libstdc++-devel >= 6:4.0
 BuildRequires: pcre-cxx-devel
 BuildRequires: pcre-devel
 BuildRequires: readline-devel
+BuildRequires: rpmbuild(macros) >= 1.228
 BuildRequires: scons >= 1.2
 BuildRequires: v8-devel
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -45,6 +46,8 @@ to develop mongo client software.
 Summary:       MongoDB server, sharding server, and support scripts
 Group:         Applications/Databases
 Requires:      %{name} = %{version}-%{release}
+Requires(post,preun):  /sbin/chkconfig
+Requires:      rc-scripts
 
 %description server
 Mongo (from "huMONGOus") is a schema-free document-oriented database.
@@ -97,13 +100,14 @@ groupadd -r mongod 2>/dev/null || :
 useradd -r -g mongod -d %{_var}/lib/mongo -s /sbin/nologin -c "user for MongoDB Database Server" mongod 2>/dev/null || :
 
 %post server
-#%fillup_and_insserv -n mongod mongod
-#%restart_on_update mongod
+/sbin/chkconfig --add mongod
+%service mongod restart
 
 %preun server
-#%stop_on_removal mongod
-
-%postun server
+if [ "$1" = "0" ]; then
+       %service -q mongod stop
+       /sbin/chkconfig --del mongod
+fi
 
 %files
 %defattr(644,root,root,755)
This page took 0.036796 seconds and 4 git commands to generate.