mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 13:45:04 +02:00
Only execute chcon if selinux is enabled and use full context
fixes #10773
This commit is contained in:
parent
ba1cc1c5fa
commit
c7c3cceba8
@ -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…
x
Reference in New Issue
Block a user