summaryrefslogtreecommitdiff
path: root/community/mongodb/mongodb.install
diff options
context:
space:
mode:
Diffstat (limited to 'community/mongodb/mongodb.install')
-rwxr-xr-xcommunity/mongodb/mongodb.install15
1 files changed, 9 insertions, 6 deletions
diff --git a/community/mongodb/mongodb.install b/community/mongodb/mongodb.install
index 8808eea0d..3922c12ef 100755
--- a/community/mongodb/mongodb.install
+++ b/community/mongodb/mongodb.install
@@ -16,12 +16,15 @@ post_upgrade() {
chown -R mongodb:daemon /var/lib/mongodb
chown -R mongodb:daemon /var/log/mongodb
- # 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'
+ if [ "$(vercmp $2 1.8.2-3)" -lt 0 ]
+ 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'
+ fi
}
pre_remove() {