
for i in $SVC_SCRIPT; do
for dir in `grep RHQ_SERVER_HOME= $i | sed 's/[-a-zA-Z0-9_]*=//'`;
do
if [ -a $dir ]; then
JON_HOME=$dir;
fi
done
if [ -z "$JON_HOME" ]; then
echo " - JON/JOPR/RHQ home directory was not defined in the service script,
uninstall failed."
exit 1
else
break
fi
done
if [ -z "$JON_HOME" ]; then
echo " - JON/JOPR/RHQ home directory was not defined in the service script, uninstall
failed."
exit 1
fi
echo " - Found JON/JOPR/RHQ home directory at: $JON_HOME"
echo " * Stopping all services, removing service script..."
$SVC_SCRIPT stop
rm -f $SVC_SCRIPT
echo " * Dropping Postgres tables..."
su - postgres -c "psql -c \"DROP DATABASE rhq;\""
su - postgres -c "psql -c \"DROP USER rhqadmin;\""
echo " * Deleting JON/JOPR/RHQ..."
rm -rf $JON_HOME
echo " - Uninstall complete!"
}
# handle CLI overrides
for i in $*
do
case $i in
--jon-localuser=*)
JON_USER="`echo $i | sed 's/[-a-zA-Z0-9]*=//'`"
;;
--jon-rootdir=*)
JON_ROOT="`echo $i | sed 's/[-a-zA-Z0-9]*=//'`"
;;
--jon-url=*)
JON_URL="`echo $i | sed 's/[-a-zA-Z0-9]*=//'`"
www.redhat.com 124
Comentarios a estos manuales