Hacked By AnonymousFox

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

#!/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
    # uninstall of the package
    cloudlinux-awp-admin set-suite --suites accelerate_wp,accelerate_wp_premium --disallowed-for-all
    # 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"

Hacked By AnonymousFox1.0, Coded By AnonymousFox