blob: 33d30bed47ed57d46c028372456b4f6422862800 [file] [log] [blame]
diff --git a/system/core/init/service-launcher.cpp b/system/core/init/service-launcher.cpp
index 9493384..c0ce7f2 100644
--- a/system/core/init/service-launcher.cpp
+++ b/system/core/init/service-launcher.cpp
@@ -1,4 +1,6 @@
#include <memory>
+#include <string.h>
+#include <stdlib.h>
#include "init_parser.h"
#include "service.h"
@@ -12,6 +14,12 @@ int main(int argc, char** argv) {
Parser& parser = Parser::GetInstance();
parser.AddSectionParser("service",std::make_unique<ServiceParser>());
parser.ParseConfig(argv[1]);
-
+
+ char serv_name[20] = {0};
+ strncpy(serv_name, argv[1] + strlen("init."), strlen(argv[1]) - strlen("init.") - strlen(".rc"));
+
+ char cmd[40] = "sncfg prop_set ctl.stop ";
+ strcat(cmd, serv_name);
+ system(cmd);
return 0;
}