#!/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 # For details see: # 1. https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#summary-of-ways-maintainer-scripts-are-called # 2. https://www.debian.org/doc/debian-policy/ap-flowcharts.html # Pre install # $1 = install/upgrade # "lve-stats DEBIAN PREINST STARTED" rhel=8 solo_marker=/etc/cloudlinux-edition-solo if [[ -f "$solo_marker" ]]; then exit 0 fi if [[ $1 == "upgrade" ]]; then # stop "old" server if [[ "$rhel" -lt 7 ]]; then killall lvestats-server > /dev/null 2>&1 else /usr/bin/systemctl kill lvestats fi rm -f /var/lock/subsys/lvestats-server > /dev/null 2>&1 fi # "lve-stats DEBIAN PREINST FINISHED" exit 0