summaryrefslogtreecommitdiffstats
path: root/pki/base/common/scripts/functions
diff options
context:
space:
mode:
Diffstat (limited to 'pki/base/common/scripts/functions')
-rw-r--r--pki/base/common/scripts/functions9
1 files changed, 7 insertions, 2 deletions
diff --git a/pki/base/common/scripts/functions b/pki/base/common/scripts/functions
index 2ae93c520..871a57b54 100644
--- a/pki/base/common/scripts/functions
+++ b/pki/base/common/scripts/functions
@@ -693,8 +693,13 @@ start_instance()
# Invoke the initscript for this instance
case $PKI_SUBSYSTEM_TYPE in
ca|kra|ocsp|tks)
- /usr/bin/runcon -t pki_${PKI_SUBSYSTEM_TYPE}_script_t $PKI_INSTANCE_INITSCRIPT start
- rv=$?
+ if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
+ /usr/bin/runcon -t pki_${PKI_SUBSYSTEM_TYPE}_script_t \
+ $PKI_INSTANCE_INITSCRIPT start
+ rv=$?
+ else
+ $PKI_INSTANCE_INITSCRIPT start
+ fi
;;
ra|tps)
$PKI_INSTANCE_INITSCRIPT start