Done !
| Server IP : 192.145.236.177 / Your IP : 216.73.216.238 Web Server : Apache System : Linux ded5817.inmotionhosting.com 5.14.0-687.26.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Jul 14 16:32:02 EDT 2026 x86_64 User : personalinjurynh ( 1013) PHP Version : 8.1.34 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /bin/ |
Upload File : |
#!/usr/bin/sh
#
# Copyright (c) 2023 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.
#
# Redact sensitive information from a PCP archive.
#
. $PCP_DIR/etc/pcp.env
status=1
tmp=`mktemp -d "$PCP_TMPFILE_DIR/pmlogredact.XXXXXXXXX"` || exit 1
trap "rm -rf $tmp; exit \$status" 0
prog=`basename $0`
cat > $tmp/usage << EOF
# getopts: c:D:vx?
# Usage: [options] inarch outarch
Options:
-c, --config=FILE_or_DIR additional configuration file or directory
-v, --verbose increase diagnostic verbosity
-x, --exclude-std do not use the standard configuration files
--help
EOF
_usage()
{
pmgetopt --progname=$prog --config=$tmp/usage --usage
exit 1
}
vflag=''
debug=''
std_config='-c ${PCP_SYSCONF_DIR}/pmlogredact'
ARGS=`pmgetopt --progname=$prog --config=$tmp/usage -- "$@"`
[ $? != 0 ] && exit 1
eval set -- "$ARGS"
while [ $# -gt 0 ]
do
case "$1"
in
-c) # additional config file(s)
config="$config -c '$2'"
shift
;;
-D) # debug
debug="$debug -D '$2'"
shift
;;
-x) # exclude std configs
std_config=''
;;
-v) # verbose
vflag=-v
;;
--)
shift
break
;;
-\?)
_usage
# NOTREACHED
;;
esac
shift
done
if [ $# -ne 2 ]
then
_usage
# NOTREACHED
fi
eval pmlogrewrite $debug $vflag $std_config $config "$1" "$2"
status=$?