Mini Shell

Direktori : /usr/share/wpos/scriptlets/
Upload File :
Current File : //usr/share/wpos/scriptlets/rpm_preun_wpos.sh

#!/usr/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

# RPM:
# $1 == 1 -- upgrade
# $1 == 0 -- uninstall

# DEB:
# $1 == remove/upgrade

# "wpos PRE UNINSTALL STARTED"


_clshare_wpos=$2
rhel=$3

if [[ "$1" == 0 || $1 == "remove" ]]; then
    /usr/share/cloudlinux/wpos/enable_redis_for_alt_php.py --remove-custom-ini >/dev/null 2>&1
    # turning off suites
    cloudlinux-awp-admin set-suite --suites ALL --disallowed-for-all
    # uninstall of the hooks
    /usr/share/cloudlinux/wpos/wpos_hooks.py --uninstall >/dev/null 2>&1
    # Stop WPOS daemon
    /sbin/service clwpos_monitoring stop

    if [[ $rhel -gt 6 ]]; then
        # CL7, 8, Solo
        systemctl disable clwpos_monitoring.service >/dev/null 2>&1
        systemctl daemon-reload
    else
        # CL6
        /sbin/chkconfig --del clwpos_monitoring
    fi

fi

# Uninstall plesk extension
if [ -f "/usr/sbin/plesk" ]; then
  /usr/sbin/plesk bin extension -u accelerate-wp &>/dev/null
fi

# "wpos PRE UNINSTALL FINISHED"

Zerion Mini Shell 1.0