Rename settings-file to mvn-settings
[releng/global-jjb.git] / shell / sysstat.sh
index 03cab6d..66c18f8 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/bash
-# @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
+# SPDX-License-Identifier: EPL-1.0
 ##############################################################################
 # Copyright (c) 2017 The Linux Foundation and others.
 #
@@ -15,6 +15,11 @@ OS=$(facter operatingsystem)
 case "$OS" in
     Ubuntu)
         SYSSTAT_PATH="/var/log/sysstat"
+
+        # Dont run the script when systat is not enabled by default
+        if ! grep --quiet 'ENABLED="true"' "/etc/default/sysstat"; then
+            exit 0
+        fi
     ;;
     CentOS|RedHat)
         SYSSTAT_PATH="/var/log/sa"