Relationship between service commands and/etc/init. d/in Linux
Source: Internet
Author: User
In Linux, the service command and/etc/init. d/relationship servicexxx start/etc/init. the xxx script in the d/directory is saved in/etc/init. run the mysvc script echopassedinoption $0 $ 1i...
In Linux, the service command and/etc/init. d/relationship service xxx start/etc/init. the xxx script in the d/directory is saved in/etc/init. run the mysvc script echo passed in option $0 $1 if [$1 = "start"] then echo myservice started ......... ............................... elif [$1 = "stop"] then echo myservice stoped ........................... ............. else echo myservice not supported option .................................. ...... fi www.2cto.com [root @ localhost init. d] # service mysvc startpassed in option/etc/init. d/mysvc startmyservice started ................................... ..... [root @ localhost init. d] # service mysvc stoppassed in option/etc/init. d/mysvc stopmyservice stoped ................................... ..... [root @ localhost init. d] # service mysvc xxxpassed in option/etc/init. d/mysvc xxxmyservice not supported option ................................. ....... author kkdelta
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.