#!/bin/sh
user_name=`whoami`
dirname0=`dirname $0`
jboss_folder_name=`cd $dirname0/..; pwd`
pid=`ps -ef | grep $user_name | grep $jboss_folder_name | grep server | grep -v grep | awk '{printf "%s", $2}'`
if [ "$pid"x = ""x ];
then
echo 'JBoss server did not startup.'
else
kill -9 $pid
echo 'JBoss server is already shutdown ! kill process id :'$pid
fi
本文介绍了一个用于检查和强制关闭JBoss服务器进程的Shell脚本。该脚本通过获取当前用户、脚本目录、JBoss安装路径等信息,查找并终止与JBoss服务器相关的进程,适用于Linux/Unix环境。
425

被折叠的 条评论
为什么被折叠?



