Error in stopping script of RedHatjboss

Source: Internet
Author: User
Tags stop script jboss server
RedHatjboss stop Script Error-Linux general technology-Linux technology and application information. The following is a detailed description. System Environment Red Hat Enterprise Linux Server release 5.3
Call the following method when jboss stops:
Stop_broker ()
{
Pid_list = 'ps-o user = $ USER_NAME-o pid-o ppid-o args-eaf | grep $ USER_NAME | grep "$1" | grep-v grep |/usr/ bin/awk '{print $2 }''

For I in $ pid_list
Do
/Bin/echo "Parent process id: $ I"
Kill_child-9 $ I "$1"
/Bin/echo "done ."
/Bin/echo "jBoss Server stopped! ">>$ LOG_FILE-'date' + % y-% m-% D'. log
Done

}
When the first line is executed, the system prompts Warning: bad syntax, perhaps a bogu '-'? See/usr/share/doc/procps-3.2.7/FAQ
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.