Compile start-stop-daemon in centos and support the latest option (-- chdir)

Source: Internet
Author: User
Centos compiles start-stop-daemon and supports the latest option (-- chdir) start-stop-daemon, which is a debian tool. This library is not available in centosredhat release. To be compatible with some scripts to call this program, we need to manually compile this tool. Unfortunately, you compile and run centos to compile start-stop-daemon. the latest option (-- chdir) start-stop-daemon is supported as the debian tool. This library is not available in centos/redhat release. To be compatible with some scripts to call this program, we need to manually compile this tool. Unfortunately, after compilation and running, you find that this version does not support -- chdir option, start-stop-daemon -- help start-stop-daemon 1.9.18 for Debian-small and fast C version written byMarek Michalkiewicz , Public domain. usage: start-stop-daemon-S | -- start options... -- arguments... start-stop-daemon-K | -- stop options... start-stop-daemon-H | -- help start-stop-daemon-V | -- version Options (at least one of -- exec | -- pidfile | -- user is required ): -x | -- exec Program to start/check if it is running-p | -- pidfile Pid file to check-c | -- chuid Change to this user/group before starting process-u | -- user | Stop processes owned by this user-n | -- name Stop processes with this name-s | -- signal Signal to send (default TERM)-a | -- startas Program to start (default is )-N | -- nicelevel Add incr to the process's nice level-B | -- background force the process to detach-m | -- make-pidfile create the pidfile before starting-R | -- retry Check whether processes die, and retry-t | -- test mode, don't do anything-o | -- oknodo exit status 0 (not 1) if nothing done-q | -- quiet be more quiet-v | -- verbose be more verboseRetry Is |/ /... Where Is one- | [-] Send that signal Wait that waits seconds forever repeat remainder foreveror May be just , Meaning / /KILL/ Exit status: 0 = done 1 = nothing done (=> 0 if -- oknodo) 3 = trouble 2 = with -- retry, the processes wouldn't die does not have the -- chdir option I need. Continue google search (ps: General this English library search using google, baidu basic search can not find useful stuff) Below is my installation process wget http://ftp.de.debian.org/debian/pool/main/d/dpkg/dpkg_1.17.1.tar.xztar-xf dpkg_1.17.1.tar.xz cd dpkg-1.17.1. /configure>/dev/nullmake>/dev/nullcd utilsmakesudo cp start-stop-daemon/usr/local/bin/start-stop-daemon prompt: make>/dev/null will report an error regardless of it. Because we only need start-stop-daemon in the subsequent cd utils to run start-stop-daemon -- help now. The result is as follows. you can find the -- chdir option that I want. Usage: start-stop-daemon [ ...]Commands:-S | -- start --... start a program and pass to it-K | -- stop a program-T | -- status get the program status-H | -- help print help information-V | -- version print version Matching options (at least one is required) :-p | -- pidfile Pid file to check-x | -- exec Program to start/check if it is running-n | -- name Process name to check-u | -- user Process owner to check Options:-g | -- group Run process as this group-c | -- chuid Change to this user/group before starting process-s | -- signal Signal to send (default TERM)-a | -- startas Program to start (default is )-R | -- chroot Chroot Before starting-d | -- chdir Change (Default is/)-N | -- nicelevel Add incr to the process 'nice level-P | -- procsched Use With For the kernel process scheded (default prio is 0)-I | -- iosched Use With To set the IO scheduler (default prio is 4)-k | -- umask Change the umask Before starting-B | -- background force the process to detach-C | -- no-close do not close any file descriptor-m | -- make-pidfile create the pidfile before starting-R | -- retry Check whether processes die, and retry-t | -- test mode, don't do anything-o | -- oknodo exit status 0 (not 1) if nothing done-q | -- quiet be more quiet-v | -- verbose be more verbose Retry Is |/ /... Where Is one- | [-] Send that signal Wait that waits seconds forever repeat remainder foreveror May be just , Meaning / /KILL/ The process scheduler Can be one of: other, fifo or rr The IO scheduler Can be one of: real-time, best-effort or idle Exit status: 0 = done 1 = nothing done (=> 0 if -- oknodo) 2 = with -- retry, processes wocould not die 3 = troubleExit status with -- status: 0 = program is running 1 = program is not running and the pid file exists 3 = program is not running 4 = unable to determine status

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.