summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Miguel De Anda <miguel@thedeanda.com>2017-10-19 20:42:02 +0700
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2017-10-19 20:42:02 +0700
commit71c7c3f01f7975a02faf4d50c02ab031af3f6081 (patch)
tree97915bc261cd7dc40e51451c3e32a492dd5bec5d
parent1d0a4b9a1936e80584572aa26ca4e9fca1b062b7 (diff)
downloadslackbuilds-71c7c3f01f7975a02faf4d50c02ab031af3f6081.tar.gz
slackbuilds-71c7c3f01f7975a02faf4d50c02ab031af3f6081.tar.xz
system/mongodb: Updated for version 3.4.9.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--system/mongodb/mongodb.SlackBuild7
-rw-r--r--system/mongodb/mongodb.info6
-rw-r--r--system/mongodb/rc.mongodb21
3 files changed, 24 insertions, 10 deletions
diff --git a/system/mongodb/mongodb.SlackBuild b/system/mongodb/mongodb.SlackBuild
index b74d59adfc..99d3331f9e 100644
--- a/system/mongodb/mongodb.SlackBuild
+++ b/system/mongodb/mongodb.SlackBuild
@@ -24,9 +24,10 @@
PRGNAM="mongodb"
-VERSION=${VERSION:-3.4.1}
+VERSION=${VERSION:-3.4.9}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+MAKEJOBS=${MAKEJOBS:-1}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -86,9 +87,9 @@ find -L . \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
if [ "$ARCH" = "x86_64" ]; then
- scons --ssl --disable-warnings-as-errors --prefix=${PKG}/usr core install
+ scons -j $MAKEJOBS --ssl --disable-warnings-as-errors --prefix=${PKG}/usr core install
else
- scons --ssl --disable-warnings-as-errors --prefix=${PKG}/usr core --wiredtiger=off install
+ scons -j $MAKEJOBS --ssl --disable-warnings-as-errors --prefix=${PKG}/usr core --wiredtiger=off install
fi
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
diff --git a/system/mongodb/mongodb.info b/system/mongodb/mongodb.info
index f5cd0d64e7..8c57d99cc5 100644
--- a/system/mongodb/mongodb.info
+++ b/system/mongodb/mongodb.info
@@ -1,10 +1,10 @@
PRGNAM="mongodb"
-VERSION="3.4.1"
+VERSION="3.4.9"
HOMEPAGE="https://www.mongodb.org/"
DOWNLOAD="UNSUPPORTED"
MD5SUM=""
-DOWNLOAD_x86_64="https://fastdl.mongodb.org/src/mongodb-src-r3.4.1.tar.gz"
-MD5SUM_x86_64="87c59198dbe3aca7832378725e05fd91"
+DOWNLOAD_x86_64="https://fastdl.mongodb.org/src/mongodb-src-r3.4.9.tar.gz"
+MD5SUM_x86_64="c8c9f521807b1097e04ffa2081e35177"
REQUIRES=""
MAINTAINER="Miguel De Anda"
EMAIL="miguel@thedeanda.com"
diff --git a/system/mongodb/rc.mongodb b/system/mongodb/rc.mongodb
index f00cc685c4..47ca19be76 100644
--- a/system/mongodb/rc.mongodb
+++ b/system/mongodb/rc.mongodb
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# /etc/rc.d/rc.mongo
+# /etc/rc.d/rc.mongodb
#
# Start/stop/restart the mongodb server.
#
@@ -11,23 +11,36 @@ LOG=/var/log/mongodb
DBPATH=/var/lib/mongodb
USER=mongo
GROUP=mongo
+SHELL=${SHELL:-/bin/bash}
mongo_start() {
touch $LOG
chown $GROUP.$USER $LOG
touch $PID
chown $GROUP.$USER $PID
- sudo -u $USER /usr/bin/mongod \
+
+ su -l $USER -s $SHELL -c "/usr/bin/mongod \
--dbpath=$DBPATH \
--fork \
--pidfilepath=$PID \
--logappend \
--logpath=$LOG \
- --nohttpinterface
+ --nohttpinterface \
+ " && {
+ echo "MongoDB server started successfully."
+ } || {
+ echo "Failed starting MongoDB server!" > /dev/stderr
+ exit 1
+ }
}
mongo_stop() {
- kill `cat $PID`
+ kill `cat $PID` && {
+ echo "MongoDB server stopped."
+ } || {
+ echo "Failed to stop MongoDB server" > /dev/stderr
+ exit 1
+ }
# rm $PID
}