#!/bin/bash # analog of %post/%posttrans RPM scriptlet # 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 # Arguments in short: # "$1" == "configure" - RPM post/posttrans # "$1" == "abort-upgrade" - upgrade package error # "$1" == "abort-remove" - remove package error # "lve-utils DEBIAN POSTINST STARTED" echo "$@" rhel=8 cl_venv_path=/opt/cloudlinux/venv _sbindir=/usr/sbin app_detector_cron_ver=5 solo_marker=/etc/cloudlinux-edition-solo container_marker=/etc/cloudlinux-container _clshare=/usr/share/cloudlinux app_detector_cron_ver_file=$_clshare/.app_detector_cron_ver force_collecting_domains_is_done=$_clshare/.force_collecting_domains_is_done _clshare_crons=$_clshare/lveutils_crons wpos_req_cron_file=/etc/cron.d/clwpos_req_cron cloudlinux_cron_file=/etc/cron.d/cloudlinux-cron crondir_dom_coll_file=/etc/cron.d/cloudlinux_domains_collector force_collecting_domains_cron_file=/etc/cron.d/force_collecting_domains case "$1" in configure) # NOTE: DEB Package Manager fails on any scriptlet error, so we mute them [[ -z "$2" ]] && upgrade_arg="install" || upgrade_arg="upgrade" # RPM post.sh /usr/share/lve-utils/scriptlets/rpm_post.sh "$upgrade_arg" $_sbindir $rhel $solo_marker $container_marker $cl_venv_path || true # RPM posttrans.sh /usr/share/lve-utils/scriptlets/rpm_posttrans.sh "$upgrade_arg" $rhel $solo_marker $container_marker $_clshare \ $cloudlinux_cron_file $app_detector_cron_ver_file $crondir_dom_coll_file $force_collecting_domains_is_done \ $force_collecting_domains_cron_file $_clshare_crons $cl_venv_path $app_detector_cron_ver || true /usr/share/cloudlinux/cl_plus/plesk_sync_package_id || true ;; *) ;; esac # Automatically added by dh_installinit/12.10ubuntu1 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then if [ -x "/etc/init.d/lve-utils" ]; then update-rc.d lve-utils defaults >/dev/null invoke-rc.d lve-utils start || exit 1 fi fi # End automatically added section # "lve-utils DEBIAN POSTINST FINISHED" exit 0