summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@tele2.at>2018-08-24 16:54:54 +0200
committerDavid Oberhollenzer <david.oberhollenzer@tele2.at>2018-08-24 21:17:31 +0200
commitec6264bad59d103671c1529e47d1598941dba4b1 (patch)
tree77b10725ec8b2f4c2b30093ce6e7ccea0ee8b982
parent25afc0b3d0abb061829af926a38b31c977511531 (diff)
initd: accept sigterm and simply initiate shutdown target
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
-rw-r--r--initd/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/initd/main.c b/initd/main.c
index 561bae6..08e314f 100644
--- a/initd/main.c
+++ b/initd/main.c
@@ -40,6 +40,9 @@ static void handle_signal(void)
supervisor_handle_exited(pid, status);
}
break;
+ case SIGTERM:
+ supervisor_set_target(TGT_SHUTDOWN);
+ break;
case SIGINT:
supervisor_set_target(TGT_REBOOT);
break;