0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 09:06:21 +01:00

SERVER-3579 Change redhat username and group from mongod to mongodb

This commit is contained in:
Ernie Hershey 2013-09-30 13:33:08 -04:00
parent 09ffdcc927
commit ef582b64cb
3 changed files with 16 additions and 16 deletions

View File

@ -856,12 +856,12 @@ touch $RPM_BUILD_ROOT/var/log/mongodb/mongod.log
rm -rf $RPM_BUILD_ROOT
%pre server
if ! /usr/bin/id -g mongod &>/dev/null; then
if ! /usr/bin/id -g mongodb &>/dev/null; then
/usr/sbin/groupadd -r mongod
fi
if ! /usr/bin/id mongod &>/dev/null; then
/usr/sbin/useradd -M -r -g mongod -d /var/lib/mongodb -s /bin/false \
-c mongod mongod > /dev/null 2>&1
if ! /usr/bin/id mongodb &>/dev/null; then
/usr/sbin/useradd -M -r -g mongodb -d /var/lib/mongodb -s /bin/false \
-c mongodb mongodb > /dev/null 2>&1
fi
%post server
@ -926,9 +926,9 @@ fi
/etc/rc.d/init.d/mongod
/etc/sysconfig/mongod
#/etc/rc.d/init.d/mongos
%attr(0755,mongod,mongod) %dir /var/lib/mongodb
%attr(0755,mongod,mongod) %dir /var/log/mongodb
%attr(0640,mongod,mongod) %config(noreplace) %verify(not md5 size mtime) /var/log/mongodb/mongod.log
%attr(0755,mongodb,mongodb) %dir /var/lib/mongodb
%attr(0755,mongodb,mongodb) %dir /var/log/mongodb
%attr(0640,mongodb,mongodb) %config(noreplace) %verify(not md5 size mtime) /var/log/mongodb/mongod.log
%changelog
* Thu Jan 28 2010 Richard M Kreuter <richard@10gen.com>

View File

@ -26,8 +26,8 @@ DBPATH=`awk -F= '/^dbpath[[:blank:]]*=[[:blank:]]*/{print $2}' "$CONFIGFILE"`
PIDFILE=`awk -F= '/^pidfilepath[[:blank:]]*=[[:blank:]]*/{print $2}' "$CONFIGFILE"`
mongod=${MONGOD-/usr/bin/mongod}
MONGO_USER=mongod
MONGO_GROUP=mongod
MONGO_USER=mongodb
MONGO_GROUP=mongodb
if [ -f "$SYSCONFIG" ]; then
. "$SYSCONFIG"

View File

@ -90,11 +90,11 @@ touch $RPM_BUILD_ROOT/var/log/mongodb/mongod.log
rm -rf $RPM_BUILD_ROOT
%pre server
if ! /usr/bin/id -g mongod &>/dev/null; then
/usr/sbin/groupadd -r mongod
if ! /usr/bin/id -g mongodb &>/dev/null; then
/usr/sbin/groupadd -r mongodb
fi
if ! /usr/bin/id mongod &>/dev/null; then
/usr/sbin/useradd -M -r -g mongod -d /var/lib/mongodb -s /bin/false -c mongod mongod > /dev/null 2>&1
if ! /usr/bin/id mongodb &>/dev/null; then
/usr/sbin/useradd -M -r -g mongodb -d /var/lib/mongodb -s /bin/false -c mongodb mongodb > /dev/null 2>&1
fi
%post server
@ -124,9 +124,9 @@ fi
%{_mandir}/man1/mongod.1*
/etc/rc.d/init.d/mongod
/etc/sysconfig/mongod
%attr(0755,mongod,mongod) %dir /var/lib/mongodb
%attr(0755,mongod,mongod) %dir /var/log/mongodb
%attr(0640,mongod,mongod) %config(noreplace) %verify(not md5 size mtime) /var/log/mongodb/mongod.log
%attr(0755,mongodb,mongodb) %dir /var/lib/mongodb
%attr(0755,mongodb,mongodb) %dir /var/log/mongodb
%attr(0640,mongodb,mongodb) %config(noreplace) %verify(not md5 size mtime) /var/log/mongodb/mongod.log
%files shell
%defattr(-,root,root,-)