HEX
Server: Apache
System: Linux hz.vslconceptsdomains.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: dkfounda (3233)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //var/lib/dpkg/info/wp-toolkit-cpanel.postinst
### Copyright 1999-2025. WebPros International GmbH. All rights reserved.
[ -z "$WP_TOOLKIT_INSTALLER_DEBUG" ] || set -x
[ -z "$WP_TOOLKIT_INSTALLER_STRICT_MODE" ] || set -e

create_logrotate_config()
{
    if [ ! -d /etc/logrotate.d ]; then
        return
    fi

    (
        echo "/usr/local/cpanel/3rdparty/wp-toolkit/var/logs/sw-*.log {"
        echo "    size 10M"
        echo "    rotate 5"
        echo "    copytruncate"
        echo "    missingok"
        echo "    notifempty"
        echo "    compress"
        echo "    delaycompress"
        echo "}"
    ) > /etc/logrotate.d/wp-toolkit
}


case "$1" in
    configure)
        create_logrotate_config

        PREVIOUS_PACKAGE_VERSION="$2" /usr/local/cpanel/3rdparty/wp-toolkit/bin/post-install.sh
        ;;
    abort-upgrade|abort-remove|abort-deconfigure)
        ;;
    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
        ;;
esac

exit 0