Skip to content

Commit

Permalink
community/mongodb to 3.2.8-2
Browse files Browse the repository at this point in the history
  • Loading branch information
kmihelich committed Jul 28, 2016
1 parent 4b70205 commit 8768001
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
2 changes: 1 addition & 1 deletion community/mongodb/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ buildarch=28

pkgname=mongodb
pkgver=3.2.8
pkgrel=1
pkgrel=2
pkgdesc='A high-performance, open source, schema-free document-oriented database'
arch=('i686' 'x86_64')
url='http://www.mongodb.org'
Expand Down
22 changes: 5 additions & 17 deletions community/mongodb/mongodb.install
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# vim: syntax=sh

post_install() {
useradd -r -g daemon -d /var/lib/mongodb -s /bin/bash mongodb
chown -R mongodb:daemon /var/lib/mongodb
chown -R mongodb:daemon /var/log/mongodb
post_upgrade $1 ''

if [ "$(uname -m)" != "x86_64" ]
then
Expand All @@ -13,20 +11,10 @@ post_install() {
}

post_upgrade() {
chown -R mongodb:daemon /var/lib/mongodb
chown -R mongodb:daemon /var/log/mongodb

if [ "$(vercmp $2 1.8.2-3)" -lt 0 ]
if ! getent passwd mongodb >/dev/null
then
# have to fix my fudge up in 1.8.2-2 and 1.8.2-3
# added july 5th, 2011
usermod -s /bin/bash mongodb >& /dev/null
echo 'The dbpath has changed from /var/state/mongodb to /var/lib/mongodb'
echo 'Make sure you move your data files to the new dbpath before you start/restart mongodb'
echo 'The logpath has changed from /var/log/mongod to /var/log/mongodb/mongod.log'
useradd -r -g daemon -d /var/lib/mongodb -s /bin/bash mongodb
fi
}

pre_remove() {
userdel mongodb
chown -R mongodb:daemon /var/lib/mongodb
chown -R mongodb:daemon /var/log/mongodb
}

0 comments on commit 8768001

Please sign in to comment.