auto sd_type = static_cast<ShutdownType>(rbuf[1]);
service_set->stop_all_services(sd_type);
- enable_console_log(true);
char ackBuf[] = { DINIT_RP_ACK };
if (! queuePacket(ackBuf, 1)) return;
/* handle SIGINT signal (generated by kernel when ctrl+alt+del pressed) */
static void sigint_reboot_cb(struct ev_loop *loop, ev_signal *w, int revents)
{
- enable_console_log(true);
service_set->stop_all_services(ShutdownType::REBOOT);
}
/* handle SIGTERM/SIGQUIT - stop all services (not used for system daemon) */
static void sigterm_cb(struct ev_loop *loop, ev_signal *w, int revents)
{
- enable_console_log(true);
service_set->stop_all_services();
}