From 5988474f0bdc20f1e792ec7a1021d3352d306ff0 Mon Sep 17 00:00:00 2001 From: Trevor Hess Date: Fri, 13 Apr 2018 16:56:33 -0500 Subject: [PATCH] adding sleep to wait for mongo to start before running post-run hook Signed-off-by: Trevor Hess --- hooks/post-run | 3 +++ plan.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hooks/post-run b/hooks/post-run index b9daf5b..63d122b 100644 --- a/hooks/post-run +++ b/hooks/post-run @@ -1,4 +1,7 @@ #!/bin/sh # +#add sleep to wait for mongo to come online +sleep 30s + {{pkgPathFor "core/mongo-tools"}}/bin/mongoimport --drop -d demo -c nationalparks --type json --jsonArray --file {{pkg.path}}/national-parks.json --host={{sys.ip}} --port={{cfg.mongod.net.port}} diff --git a/plan.sh b/plan.sh index b8bb5d2..7b28e8c 100644 --- a/plan.sh +++ b/plan.sh @@ -1,6 +1,6 @@ pkg_origin=echohack pkg_name=np-mongodb -pkg_version=3.2.9 +pkg_version=3.3.1 pkg_description="Mongodb for National-Parks app" pkg_maintainer="echohack" pkg_license=('AGPL-3.0')