aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-03-04 16:09:09 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-03-04 16:09:09 -0300
commitbdeea262abde8efeac8dfb2ecd68ea6a1be2fd3a (patch)
tree30c7a15e0870803143a58b3d5970ea4f79bc2db1 /share
parentdc3c4ae0b41b6d7873f357be2af48fb7a3ed4c02 (diff)
downloadhydra-bdeea262abde8efeac8dfb2ecd68ea6a1be2fd3a.tar.gz
hydra-bdeea262abde8efeac8dfb2ecd68ea6a1be2fd3a.tar.bz2
Hydra provision enhancements
Diffstat (limited to 'share')
-rwxr-xr-xshare/hydra/provision16
1 files changed, 13 insertions, 3 deletions
diff --git a/share/hydra/provision b/share/hydra/provision
index 862e0e1..fc67109 100755
--- a/share/hydra/provision
+++ b/share/hydra/provision
@@ -22,9 +22,19 @@ hydra_config_load
# Parameters
NODE="$1"
-CONFIG="$HYDRA_FOLDER/config/provision/$NODE"
+CONFIG="$HYDRA_FOLDER/config/provision"
+
+# Ensure config folder exists
+mkdir -p $CONFIG
+
+# Syntax
+if [ -z "$NODE" ]; then
+ echo "Available configurations:"
+ ( cd $CONFIG && tree )
+ exit 1
+fi
# Provision
-if [ -e "$CONFIG" ]; then
- hydractl provision $CONFIG
+if [ -e "$CONFIG/$NODE.conf" ]; then
+ hydractl provision $CONFIG/$NODE.conf
fi