Mark service active if it is started while not active.
authorDavin McCall <davmac@davmac.org>
Tue, 12 Jan 2016 08:56:10 +0000 (08:56 +0000)
committerDavin McCall <davmac@davmac.org>
Tue, 12 Jan 2016 08:56:10 +0000 (08:56 +0000)
(It will mark itself inactive when it stops).

src/service.cc

index f810b04c7f6ddd34db9b667d1ccd992c831d0e15..e319a6fcb4e725479cd8c2002750ac0bd28dda41 100644 (file)
@@ -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();