JBoss 在服务器重新启动时停止尾部
我有一个 shell 脚本,它作为计划任务在新部署之后重新启动 JBoss。问题是 jboss 在重新启动时自动跟踪 server.log,这意味着我的 shell 脚本将不会停止,直到服务器再次停止,因为 ctrl-c 似乎不会杀死尾部,我不知道如何解决这个问题?
我见过一些其他例子,人们使用kill -9 来停止尾部?
理想情况下,我希望 server.log 的输出一直到服务器启动并运行为止,但这也可以在计时器上(60秒后停止尾部?)
这是到目前为止的脚本...
echo "1) Archive Found To Deploy"
cd /home/webApp/toDeploy
chown jboss Archive.ear
chgrp jboss Archive.ear
mv Archive.ear /opt/jboss/server/default/deploy/
echo "2) Archive Copied to Deploy Folder"
/etc/init.d/jboss restart
echo "3) Server Restarted"
任何人都可以帮助我出去?
谢谢
I have a shell script that resarts JBoss following a new deployment as a scheduled task. The problem is that jboss automatically tails the server.log on restart which means my shell script will not stop until the server is stopped again, since a ctrl-c doesnt seem to kill the tail, Im not sure how to get around this?
I have seen some other examples where people use kill -9 to stop the tail?
Ideally I would like the output from server.log up until the point where the server is up and running, but this could also be on a timer (stop tail after 60sec?)
This is the script so far...
echo "1) Archive Found To Deploy"
cd /home/webApp/toDeploy
chown jboss Archive.ear
chgrp jboss Archive.ear
mv Archive.ear /opt/jboss/server/default/deploy/
echo "2) Archive Copied to Deploy Folder"
/etc/init.d/jboss restart
echo "3) Server Restarted"
Can anyone help me out?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用&
use &