aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2015-09-11 23:11:15 -0300
committerSilvio Rhatto <rhatto@riseup.net>2015-09-11 23:11:15 -0300
commit73e0228dcfe77d4ec549bc3e29b85056939d7358 (patch)
tree752009a569e2cf5e8a7d4f3682dc14626731afed
parent41ac6ddd731d12971fe26a57a2f1de23e598b626 (diff)
downloadhydra-73e0228dcfe77d4ec549bc3e29b85056939d7358.tar.gz
hydra-73e0228dcfe77d4ec549bc3e29b85056939d7358.tar.bz2
Updates whereis to site_websites convention
-rwxr-xr-xshare/hydra/whereis10
1 files changed, 6 insertions, 4 deletions
diff --git a/share/hydra/whereis b/share/hydra/whereis
index 6aff32d..687b280 100755
--- a/share/hydra/whereis
+++ b/share/hydra/whereis
@@ -50,11 +50,13 @@ if [ -e "$PUPPET/manifests/nodes/$LAYER.pp" ]; then
fi
# Is it a website?
-if [ -e "$PUPPET/manifests/classes/websites.pp" ] && \
- grep -e "apache::site" "$PUPPET/manifests/classes/websites.pp" | grep -q "$LAYER" ; then
- echo "Defined as a website on $PUPPET/manifests/classes/websites.pp:"
+if [ -e "$PUPPET/modules/site_websites" ] && \
+ grep -R -e "apache::site" "$PUPPET/modules/site_websites/manifests/" | grep -q "$LAYER" ; then
+ MANIFEST="$(cd $PUPPET && grep -R -e "apache::site" "modules/site_websites/manifests/" | grep "$LAYER" | cut -d : -f 1)"
+
+ echo "Defined as a website on $MANIFEST:"
echo ""
- sed -n -e "/apache::site { \"$LAYER\":/,/ }/ p" $PUPPET/manifests/classes/websites.pp
+ sed -n -e "/apache::site { \"$LAYER\":/,/ }/ p" $PUPPET/$MANIFEST
fi
# DNS config