From a07be0513af5181f3e2a57f9e313f4a08740c3f4 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Fri, 13 Apr 2007 09:21:16 +0000 Subject: s-s-d now allows --signal to be used without --stop and --oknodo. man page updated accordingly --- src/start-stop-daemon.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') diff --git a/src/start-stop-daemon.c b/src/start-stop-daemon.c index ef4fac03..82270668 100644 --- a/src/start-stop-daemon.c +++ b/src/start-stop-daemon.c @@ -680,6 +680,18 @@ int main (int argc, char **argv) if (rc_is_env ("RC_QUIET", "yes") && ! verbose) quiet = true; + /* Allow start-stop-daemon --signal HUP --exec /usr/sbin/dnsmasq + * instead of forcing --stop --oknodo as well */ + if (! start && ! stop) + if (sig != SIGINT && + sig != SIGTERM && + sig != SIGQUIT && + sig != SIGKILL) + { + oknodo = true; + stop = true; + } + if (start == stop) eerrorx ("%s: need one of --start or --stop", progname); -- cgit v1.2.3