From: Gunnar Beutner Date: Sat, 26 Apr 2014 21:22:12 +0000 (+0200) Subject: Set Icinga service to start automatically. X-Git-Tag: v0.0.10~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0c60799b6a7593fdd88a228bddbe03e9416cbca9;p=icinga2 Set Icinga service to start automatically. Fixes #6050 --- diff --git a/icinga-app/icinga.cpp b/icinga-app/icinga.cpp index e8b0d5ec1..4e34019e2 100644 --- a/icinga-app/icinga.cpp +++ b/icinga-app/icinga.cpp @@ -533,6 +533,9 @@ static int SetupService(bool install, int argc, char **argv) } else printf("Service installed successfully\n"); + ChangeServiceConfig(schService, SERVICE_NO_CHANGE, SERVICE_AUTO_START, + SERVICE_ERROR_NORMAL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + SERVICE_DESCRIPTION sdDescription = { "The Icinga 2 monitoring application" }; ChangeServiceConfig2(schService, SERVICE_CONFIG_DESCRIPTION, &sdDescription);