An exception occurred while "service" stop

Source: Internet
Author: User

Write the management script of the background process, when using service Deamon-name stop, the following prompt appears:
/sbin/service:line 66:23299 Terminated env-i lang= "$LANG" path= "$PATH" term= "$TERM" "${servicedir}/${serv ICE} "${options}

The reasons are:
I set the name of the management script to be the same as the background process name, i.e.:

Background process name: Deamon-name,
Script Name:/etc/init.d/deamon-name

There is a sentence in the script:
Killall Deamon-name
Execute service deamon-name stop, which is intended to call the Deamon-name script, end the background process deamon-name, and the result even the "service Deamon-name Stop" process is also ended.

Workaround:
Sets a different name for the background process and script.

An exception occurred while "service" stop

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.