From 5d3861b93432dfc6c55a46dc836f6a6163b141e5 Mon Sep 17 00:00:00 2001 From: Jephte CLAIN Date: Mon, 2 Nov 2015 10:14:42 +0400 Subject: [PATCH] apacheconfig: si host==@@dhost@@, alors hostname=@@dhostname@@ et aliases=@@daliases@@ --- apacheconfig | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/apacheconfig b/apacheconfig index 1254bdf..d6b0862 100755 --- a/apacheconfig +++ b/apacheconfig @@ -66,11 +66,16 @@ function __template_defaultf_host() { myhost } function __template_updatef_host() { - local update_aliases - [ "$aliases" == "$hostname" ] && update_aliases=1 - __template_set_var hostname "${host%%.*}" - [ -n "$update_aliases" ] && __template_set_var aliases "$hostname" - [ -n "$ips" ] || __template_set_var ips "" + if [ "$host" == "@@dhost@@" ]; then + __template_set_var hostname @@dhostname@@ + __template_set_var aliases @@daliases@@ + else + local update_aliases + [ "$aliases" == "$hostname" ] && update_aliases=1 + __template_set_var hostname "${host%%.*}" + [ -n "$update_aliases" ] && __template_set_var aliases "$hostname" + [ -n "$ips" ] || __template_set_var ips "" + fi } __TEMPLATE_DEFAULTF_ips=__template_defaultf_ips