Skip to content

Commit

Permalink
cec_mini_kb : cec-mini-kb.service is started 1 time only when retroar…
Browse files Browse the repository at this point in the history
…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
ShigeakiAsai authored and Ntemis committed Dec 3, 2024
1 parent 50ead77 commit 266da25
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/lakka/lakka_tools/cec_mini_kb/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# 2021 Giovanni Cascione

PKG_NAME="cec_mini_kb"
PKG_VERSION="be4289751bd80470c33847073a790b83356696db"
PKG_VERSION="fea75efa52e73b1fc70750e308b153cfba84696f"
PKG_LICENSE="GPLv3"
PKG_SITE="https://github.com/spleen1981/cec-mini-kb"
PKG_URL="${PKG_SITE}/archive/${PKG_VERSION}.tar.gz"
Expand Down
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
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 (;;)
{
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ TimeoutStopSec=10
Restart=always
RestartSec=2
StartLimitInterval=0
Type=notify

[Install]
WantedBy=retroarch.target

0 comments on commit 266da25

Please sign in to comment.