From 67a0cd5f489c900d7dacdbc6396e3d6334f95a7e Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Thu, 20 Sep 2018 15:24:09 +0200 Subject: [PATCH] =?UTF-8?q?protection=20contre=20les=20variables=20non=20a?= =?UTF-8?q?ssign=C3=A9es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- evomaintenance.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/evomaintenance.sh b/evomaintenance.sh index 420f4b5..93a9c66 100644 --- a/evomaintenance.sh +++ b/evomaintenance.sh @@ -7,6 +7,9 @@ # version 0.3 # Copyright 2007-2018 Gregory Colpart , Jérémy Lecour , Evolix +# Treat unset variables as an error when substituting. +set -u + test -f /etc/evomaintenance.cf && . /etc/evomaintenance.cf [ -n "${HOSTNAME}" ] || HOSTNAME=$(hostname)