aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-04-13 09:21:16 +0000
committerRoy Marples <roy@marples.name>2007-04-13 09:21:16 +0000
commita07be0513af5181f3e2a57f9e313f4a08740c3f4 (patch)
treefd1b5556d00dad01b1a75846451164d4f0dee6ef /src
parent824e9577e76df03c2572853d6ac15b10a27c9ace (diff)
s-s-d now allows --signal to be used without --stop and --oknodo. man page updated accordingly
Diffstat (limited to 'src')
-rw-r--r--src/start-stop-daemon.c12
1 files changed, 12 insertions, 0 deletions
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);