From: Davin McCall Date: Tue, 12 Jan 2016 08:56:10 +0000 (+0000) Subject: Mark service active if it is started while not active. X-Git-Tag: v0.01~32 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=962b7401c57607bb1004c868e5e47d29f1cea373;p=oweals%2Fdinit.git Mark service active if it is started while not active. (It will mark itself inactive when it stops). --- diff --git a/src/service.cc b/src/service.cc index f810b04..e319a6f 100644 --- a/src/service.cc +++ b/src/service.cc @@ -300,6 +300,10 @@ void ServiceRecord::start(bool activate) noexcept } if (desired_state == ServiceState::STARTED && service_state != ServiceState::STOPPED) return; + + if (required_by == 0) { + service_set->service_active(this); + } desired_state = ServiceState::STARTED; do_start();