commit:     dec01d375dab043eaf11cf012958e9843745705f
Author:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 14 17:48:09 2020 +0000
Commit:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
CommitDate: Tue Apr 14 17:54:27 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dec01d37

net-wireless/unifi: mongod-wrapper improvements

Thanks to Jaco Kroon

Closes: https://bugs.gentoo.org/717396
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org>

 net-wireless/unifi/files/mongod-wrapper | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/net-wireless/unifi/files/mongod-wrapper 
b/net-wireless/unifi/files/mongod-wrapper
index 21637de50a0..e8d65bb8aec 100644
--- a/net-wireless/unifi/files/mongod-wrapper
+++ b/net-wireless/unifi/files/mongod-wrapper
@@ -2,5 +2,10 @@
 
 # Remove --nohttpinterface argument, since it does not exist on MongoDB >= 
3.6.x anymore
 # See 
https://community.ubnt.com/t5/UniFi-Routing-Switching/MongoDB-3-6/td-p/2195435
-remove_nohttpinterface_arg=$(echo $* | sed -e 's/--nohttpinterface//')
-/usr/bin/mongod ${remove_nohttpinterface_arg}
+for arg do
+       shift
+       [ "${arg}" = "--nohttpinterface" ] && continue
+       set -- "$@" "${arg}"
+done
+
+exec /usr/bin/mongod "$@"

Reply via email to