]> gitweb.fluxo.info Git - hydra.git/commitdiff
Provision: accept FQDN config name
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 4 Nov 2018 12:32:03 +0000 (10:32 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 4 Nov 2018 12:32:03 +0000 (10:32 -0200)
share/hydra/provision

index a025a8e1844c5b2e51f4784770c842f719398195..9aa2dba9f8a83f8cbf19137aafde7c99c202bb5b 100755 (executable)
@@ -24,6 +24,7 @@ hydra_config_load
 NODE="$1"
 CONFIG="$HYDRA_FOLDER/config/provision"
 BASENAME="`basename $0`"
+DOMAIN="`cat $HYDRA_FOLDER/config/domain 2> /dev/null`"
 
 # Ensure config folder exists
 mkdir -p $CONFIG
@@ -36,6 +37,8 @@ if [ -z "$NODE" ]; then
 else
   if [ -e "$CONFIG/$NODE.conf" ]; then
     hydractl $BASENAME $CONFIG/$NODE.conf
+  elif [ -e "$CONFIG/$NODE.$DOMAIN.conf" ]; then
+    hydractl $BASENAME $CONFIG/$NODE.$DOMAIN.conf
   elif [ -e "$APP_BASE/share/config/provision/$NODE.conf" ]; then
     hydractl $BASENAME $APP_BASE/share/config/provision/$NODE.conf
   fi