\x20\40\x20\40
#!/bin/bash
### script to install additioanl child packages forked from lw-telegraf
set -e
# this cron _should not_ update `lw-telegraf`
# but do everything in a function in case it does
# the function will be loaded into memory before executed
function package_checks() {
## check for lw-telegraf-qemu-cgorups
# only install on storm parents
# remove after a few weeks
if [[ $(hostname) =~ host[0-9]+\..*\.xvps.liquidweb.com ]]; then
if ! rpm -q lw-telegraf-qemu-cgroups &>/dev/null; then
yum install -y lw-telegraf-qemu-cgroups &>/dev/null
fi
fi
if ! rpm -q lw-telegraf-ipmi &>/dev/null; then
if lsmod | grep -q '^ipmi_si'; then
yum install -y lw-telegraf-ipmi &>/dev/null
fi
fi
}
package_checks