-
-
Notifications
You must be signed in to change notification settings - Fork 290
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cec_mini_kb : cec-mini-kb.service is started 1 time only when retroar…
…ch.service is activated (#1984) * Fix endress CEC mini kb service start when it failed * Retry to (re)start 3 times during 20 sec * Revert "Retry to (re)start 3 times during 20 sec" This reverts commit f4d2136.
- Loading branch information
1 parent
50ead77
commit 266da25
Showing
4 changed files
with
40 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
packages/lakka/lakka_tools/cec_mini_kb/system.d/cec-mini-kb.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
[Unit] | ||
Description=cec-mini-kb | ||
DefaultDependencies=no | ||
After=retroarch.service | ||
Requires=retroarch.service | ||
|
||
[Service] | ||
ExecStart=/usr/bin/cec-mini-kb --poweroff "shutdown -P now" | ||
Restart=always | ||
RestartSec=2 | ||
Restart=no | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
WantedBy=retroarch.service |
34 changes: 34 additions & 0 deletions
34
...etroarch_base/retroarch/patches/retroarch-999-notify-initialize-complete-to-systemd.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
diff --git a/Makefile.common b/Makefile.common | ||
index 2a715f4786..cd2f49518b 100644 | ||
--- a/Makefile.common | ||
+++ b/Makefile.common | ||
@@ -788,6 +788,7 @@ endif | ||
ifeq ($(HAVE_LAKKA), 1) | ||
OBJ += network/drivers_wifi/connmanctl.o | ||
OBJ += misc/cpufreq/cpufreq.o | ||
+ LIBS += -lsystemd | ||
endif | ||
|
||
ifeq ($(HAVE_WIFI), 1) | ||
diff --git a/retroarch.c b/retroarch.c | ||
index 8137c2e358..3c766dd6cb 100644 | ||
--- a/retroarch.c | ||
+++ b/retroarch.c | ||
@@ -215,6 +215,7 @@ | ||
|
||
#ifdef HAVE_LAKKA | ||
#include "lakka.h" | ||
+#include <systemd/sd-daemon.h> | ||
#endif | ||
|
||
#define _PSUPP(var, name, desc) printf(" %s:\n\t\t%s: %s\n", name, desc, var ? "yes" : "no") | ||
@@ -5933,6 +5934,9 @@ int rarch_main(int argc, char *argv[], void *data) | ||
#if HAVE_CLOUDSYNC | ||
task_push_cloud_sync(); | ||
#endif | ||
+#ifdef HAVE_LAKKA | ||
+ sd_notify(0, "READY=1"); | ||
+#endif | ||
#if !defined(HAVE_MAIN) || defined(HAVE_QT) | ||
for (;;) | ||
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters