]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/initscripts/system/collectd
suricata: use KILL is suricata not shut down normal.
[people/pmueller/ipfire-2.x.git] / src / initscripts / system / collectd
index 761e9c3f862e23860f599ce1b1af764eed028812..5233525f0460006a6a5765d8fad554dc20ed34db 100644 (file)
@@ -31,6 +31,14 @@ case "$1" in
                if [ "${machine:0:3}" = "arm" ]; then
                        touch /etc/sysconfig/lm_sensors
                fi
+               if [ "${machine:0:7}" = "aarch64" ]; then
+                       touch /etc/sysconfig/lm_sensors
+               fi
+
+               # Do not search for sensors when running on AWS
+               if [ -e "/var/run/aws-instance-id" ]; then
+                       touch /etc/sysconfig/lm_sensors
+               fi
 
                # At first run search for sensors with sensors-detect
                if [ ! -e /etc/sysconfig/lm_sensors ]; then
@@ -88,6 +96,13 @@ case "$1" in
                        sed -i -e 's|^#include "/etc/collectd.thermal"$|include "/etc/collectd.thermal"|g' /etc/collectd.conf
                fi
 
+               # Enable cpufreq plugin if cpufreq found
+               if [ ! -e  /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq ]; then
+                       sed -i -e "s|^LoadPlugin cpufreq|#LoadPlugin cpufreq|g" /etc/collectd.conf
+               else
+                       sed -i -e "s|^#LoadPlugin cpufreq|LoadPlugin cpufreq|g" /etc/collectd.conf
+               fi
+
                # Enable swap plugin if swap found
                if [ "$(swapon -s | wc -l)" == "0" ]; then
                        sed -i -e "s|^LoadPlugin swap|#LoadPlugin swap|g" /etc/collectd.conf