Mini Shell
#!/usr/bin/bash
# Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2021 All Rights Reserved
#
# Licensed under CLOUD LINUX LICENSE AGREEMENT
# http://cloudlinux.com/docs/LICENSE.TXT
# Note: Also called from Debian
# Arguments:
# RPM
# $1 == 1 - install package
# $1 == 2 - upgrade package
# DEB
# $1 == configure - RPM post/posttrans
# "lve-stats POST TRANS STARTED"
rhel=$2
python27_sitelib=$3
if [[ ${rhel} -gt 6 ]]; then
/usr/bin/systemctl enable lvestats.service > /dev/null
fi
if [[ -f /proc/lve/list ]]; then
/sbin/service lvestats restart
fi
if [[ -f /var/lve/errors_record_list ]]; then
rm -f /var/lve/errors_record_list
fi
# remove old migration script for python2.7
rm -Rf "${python27_sitelib}"/lvestats/utils/dbmigrator-back
# Add missing settings to LveLimitsBurster.cfg
burster_cfg="/etc/sysconfig/lvestats.config/LveLimitsBurster.cfg"
if [[ -f $burster_cfg ]] && ! grep -m 1 -q -P -e '^bursting_io_multiplier=.*$' $burster_cfg; then
echo 'bursting_io_multiplier=2' >> $burster_cfg
fi
# "lve-stats POST TRANS FINISHED"
exit 0
Zerion Mini Shell 1.0