❦ 9 novembre 2015 11:51 GMT, James Page <james.p...@ubuntu.com> :
> How would you feel about using: > > for pid in $(cat $PIDFILE); do > if start-stop-daemon --help | grep -q "\-\-pid "; then > start-stop-daemon --quiet --oknodo --stop \ > --retry 5 --pid $pid --exec $HAPROXY || ret=$? > else > if kill -0 $pid 2> /dev/null; then > /bin/kill $pid || ret=4 > fi > fi > done > > This would preserve use of stop-start-daemon if the version installed > supported --pid, and drop back to the kill approach if not. Personally, I find this too hacky and not worth it. For example, if start-stop-daemon sends its output to stderr (unlikely, but...), this will break. Or if start-stop-daemon reduces its help message to only a mention of the manual page. Apollon, what do you think? -- If one cannot enjoy reading a book over and over again, there is no use in reading it at all. -- Oscar Wilde
signature.asc
Description: PGP signature