#!/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 # $1 == triggered rhel=8 cl_venv_path=/opt/cloudlinux/venv case "$1" in configure) # 'postinst' script is called differently on fresh install and upgrade # (on upgrade it is called with additional argument - old package version): # - install - 'postinst configure' # - upgrade - 'postinst configure 7.4.9-1.1646328720.103140.1' if [ -z "$2" ]; then argument="install" else argument="upgrade" fi # RPM post.sh /usr/share/cagefs/scriptlets/rpm_post.sh "$argument" "$rhel" # RPM posttrans.sh /usr/share/cagefs/scriptlets/rpm_posttrans.sh "$argument" "$rhel" "$cl_venv_path" ;; triggered) # DEB package trigger if [ "$2" == "/etc/pam.d/atd" ]; then # /etc/pam.d/atd was changed /usr/share/cagefs/scriptlets/rpm_at_trigger.sh fi if [ "$2" == "/bin/systemd" ] || [ "$2" == "/usr/sbin/rsyslogd" ]; then # /bin/systemd was changed /usr/share/cagefs/scriptlets/rpm_systemd_trigger.sh fi if [ "$2" == "/usr/sbin/suphp" ]; then # /usr/sbin/suphp was changed /usr/share/cagefs/scriptlets/rpm_suphp_trigger.sh fi if [ "$2" == "/usr/sbin/suexec" ]; then # /usr/sbin/suexec was changed /usr/share/cagefs/scriptlets/rpm_httpd_trigger.sh fi ;; *) ;; esac exit 0