#!/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 # Post install # $1 == configure # "lve-stats DEBIAN POSTINST STARTED" solo_marker=/etc/cloudlinux-edition-solo rhel=8 python_sitelib="$(/opt/cloudlinux/venv/bin/python3 -c "import sysconfig, sys; sys.stdout.write(sysconfig.get_path('purelib'))")" python27_sitelib=/opt/alt/python27/lib/python2.7/site-packages __python=/opt/cloudlinux/venv/bin/python3 scriptletspath=/usr/share/lve-stats/scriptlets if [[ -f "${solo_marker}" ]]; then exit 0 fi case "$1" in configure) # RPM post.sh $scriptletspath/rpm_post.sh $1 $rhel $python_sitelib $python27_sitelib # RPM posttrans.sh $scriptletspath/rpm_posttrans.sh $1 $rhel $python27_sitelib ;; triggered) # DEB package trigger if [[ "$2" == "/usr/sbin/dbctl" ]]; then $scriptletspath/rpm_governor_trigger.sh $__python $python_sitelib fi ;; *) ;; esac # "lve-stats DEBIAN POSTINST FINISHED" exit 0