PKGBUILDs/community/mongodb/mongodb.install

21 lines
494 B
Text
Raw Normal View History

2014-02-04 15:38:10 +00:00
# vim: syntax=sh
post_install() {
2016-07-28 21:49:22 +00:00
post_upgrade $1 ''
2014-02-04 15:38:10 +00:00
if [ "$(uname -m)" != "x86_64" ]
then
echo '==> Warning: the 32 bit version of MongoDB is limited to about 2GB of data.'
echo '==> See http://blog.mongodb.org/post/137788967/32-bit-limitations'
fi
}
post_upgrade() {
2016-07-28 21:49:22 +00:00
if ! getent passwd mongodb >/dev/null
2014-02-04 15:38:10 +00:00
then
2016-07-28 21:49:22 +00:00
useradd -r -g daemon -d /var/lib/mongodb -s /bin/bash mongodb
2014-02-04 15:38:10 +00:00
fi
2016-07-28 21:49:22 +00:00
chown -R mongodb:daemon /var/lib/mongodb
chown -R mongodb:daemon /var/log/mongodb
2014-02-04 15:38:10 +00:00
}