diff --git a/etc/initsystem/safe-reload b/etc/initsystem/safe-reload index faac2dbc7..afacc9e45 100644 --- a/etc/initsystem/safe-reload +++ b/etc/initsystem/safe-reload @@ -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