mirror of https://github.com/Icinga/icinga2.git
Only execute chcon if selinux is enabled and use full context
fixes #10773
This commit is contained in:
parent
1c37f5929a
commit
bbfc734df4
|
@ -12,8 +12,10 @@ printf "Validating config files: "
|
|||
|
||||
OUTPUTFILE=`mktemp`
|
||||
|
||||
if type chcon >/dev/null 2>&1; then
|
||||
chcon -t icinga2_tmp_t $OUTPUTFILE
|
||||
if type selinuxenabled >/dev/null 2>&1; then
|
||||
if selinuxenabled; then
|
||||
chcon -t icinga2_tmp_t $OUTPUTFILE
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! $DAEMON daemon --validate --color > $OUTPUTFILE; then
|
||||
|
|
Loading…
Reference in New Issue