summary refs log tree commit diff
path: root/service.c
diff options
context:
space:
mode:
Diffstat (limited to 'service.c')
-rw-r--r--service.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/service.c b/service.c
index 78890b8..9a3b157 100644
--- a/service.c
+++ b/service.c
@@ -119,6 +119,14 @@ err:
 	return -1;
 }
 
+void serviceDrop(size_t index) {
+	struct Service *service = &services.ptr[index];
+	if (service->state != Stop) return;
+	syslog(LOG_NOTICE, "%s[] dropped", service->name);
+	serviceFree(service);
+	services.ptr[index] = services.ptr[--services.len];
+}
+
 void serviceStatus(struct Service *service) {
 	if (service->state == Stop && service->intent == Stop) {
 		syslog(LOG_NOTICE, "%s[] is stopped", service->name);