- GRAYBYTE UNDETECTABLE CODES -

403Webshell
Server IP : 184.154.167.98  /  Your IP : 18.219.119.163
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/libexec/pcp/lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/libexec/pcp/lib/pcp
#!/bin/sh
#
# Copyright (c) 2011 Ken McDonell.  All Rights Reserved.
# 
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
# 
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
# 
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
# 
# Legacy wrapper for the Performance Co-Pilot Daemon(s) Start / Stop scripts
#
# This script is NOT part of the "rc" framework ... the "pmcd" and "pmlogger"
# scripts ARE part of the "rc" framework.  This script is provided as a
# legacy bridge for any scripts or procedures that used $PCP_RC_DIR/pcp
# from the days before PCP 3.6.
#
# The following is for chkconfig on RedHat based systems
# chkconfig: - 95 05
# description: Legacy init script wrapper for the Performance Co-Pilot (PCP) daemons
#
# The following is for insserv(1) based systems,
# e.g. SuSE, where chkconfig is a perl script.
### BEGIN INIT INFO
# Provides:          pcp
# Required-Start:
# Should-Start:
# Required-Stop:
# Should-Stop:
# Default-Start:
# Default-Stop:
# Short-Description: Legacy control for PCP daemons
# Description:       Legacy init script wrapper for the Performance Co-Pilot (PCP) daemons
### END INIT INFO

. $PCP_DIR/etc/pcp.env

# for chasing arguments we're passed from init/systemd/...
#
#debug# echo "$*: `date`" >>$PCP_LOG_DIR/rc_pcp.log
#debug# env >>$PCP_LOG_DIR/rc_pcp.log

tmp=`mktemp -d "$PCP_TMPFILE_DIR/pcp_rc.XXXXXXXXX"` || exit 1
status=0
trap "rm -rf $tmp; exit \$status" 0 1 2 3 15
prog=$PCP_RC_DIR/pcp

_usage()
{
    echo "Usage: $pmprog [-v] {start|restart|condrestart|stop|status|reload|force-reload}"
}

# wrapper for PCP daemon init scripts ... use systemctl if available,
# else run the PCP scripts directly
#
# Usage: _service <service> [on|off|restart|...]
#
_service()
{
    if [ $# -ne 2 ]
    then
	echo "_service: expect 2 arguments, not $# ($*)"
	exit
    fi
    if [ -n "$PCP_SYSTEMDUNIT_DIR" -a -f $PCP_SYSTEMDUNIT_DIR/$1.service -a "$PCPQA_SYSTEMD" != no ]
    then
	# smells like systemctl is the go ...
	#
	systemctl $2 $1.service
    elif [ -f $PCP_RC_DIR/$1 ]
    then
	$PCP_RC_DIR/$1 $2
    else
	echo "_service: $1 is not a systemctl service nor a $PCP_RC_DIR script!"
	exit
    fi
}

case "$1" in

  'start'|'restart'|'condrestart'|'reload'|'force-reload')
	_service pmcd $*
	_service pmlogger $*
        ;;

  'stop')
	_service pmlogger $*
	_service pmcd $*
        ;;

  'status')
	_service pmcd $* || status=$?
	_service pmlogger $* || status=$?
	;;

  *)
	_usage
        ;;
esac

Youez - 2016 - github.com/yon3zu
LinuXploit