summaryrefslogtreecommitdiff
path: root/community/mongodb/mongodb.install
diff options
context:
space:
mode:
Diffstat (limited to 'community/mongodb/mongodb.install')
-rwxr-xr-xcommunity/mongodb/mongodb.install31
1 files changed, 31 insertions, 0 deletions
diff --git a/community/mongodb/mongodb.install b/community/mongodb/mongodb.install
new file mode 100755
index 000000000..152f36515
--- /dev/null
+++ b/community/mongodb/mongodb.install
@@ -0,0 +1,31 @@
+# vim: syntax=sh
+
+show_msg(){
+ if [ "$(arch)" != "x86_64" ]
+ then
+ cat <<END
+###########################################################################
+# Warning: the 32 bit version of MongoDB is limited to about 2GB of data. #
+# See http://blog.mongodb.org/post/137788967/32-bit-limitations #
+###########################################################################
+END
+ fi
+}
+
+post_install() {
+ useradd -r -g daemon -d /var/state/mongodb -s /bin/false mongodb
+ chown -R mongodb:daemon /var/state/mongodb
+
+ show_msg
+}
+
+post_upgrade() {
+ chown -R mongodb:daemon /var/state/mongodb
+
+ show_msg
+}
+
+pre_remove() {
+ /etc/rc.d/mongodb stop
+ userdel mongodb
+}