#!/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 remove # $1 == remove/upgrade # "lve-stats DEBIAN PRERM STARTED" __python=/opt/cloudlinux/venv/bin/python3 rhel=8 solo_marker=/etc/cloudlinux-edition-solo python_sitelib="$(/opt/cloudlinux/venv/bin/python3 -c "import sysconfig, sys; sys.stdout.write(sysconfig.get_path('purelib'))")" if [[ -f "${solo_marker}" ]]; then exit 0 fi # NOTE: DEB Package Manager fails on any scriptlet error, so we mute them /usr/share/lve-stats/scriptlets/rpm_preun.sh "$1" $__python $rhel $python_sitelib || true # "lve-stats DEBIAN PRERM FINISHED" exit 0