From 78f1b294a9165fe9d968b28176cd2c0dd33c3f5b Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 15 Jun 2017 01:01:55 +0200 Subject: [PATCH] CNeutrinoApp: add hook for neutrino start Script will be executed on start of neutrino before. Handling is similar like all other possible hooks, see global.h. --- src/global.h | 1 + src/neutrino.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/global.h b/src/global.h index 65f55aff7..7bde595f7 100644 --- a/src/global.h +++ b/src/global.h @@ -42,6 +42,7 @@ #define MOVIEPLAYER_START_SCRIPT CONFIGDIR "/movieplayer.start" #define MOVIEPLAYER_END_SCRIPT CONFIGDIR "/movieplayer.end" #define NEUTRINO_ENTER_FLASH_SCRIPT CONFIGDIR "/flash.start" +#define NEUTRINO_APP_START_SCRIPT CONFIGDIR "/neutrino.start" #define NEUTRINO_SCAN_SETTINGS_FILE CONFIGDIR "/scan.conf" #define NEUTRINO_PARENTALLOCKED_FILE DATADIR "/neutrino/.plocked" diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 1a2d9fb7b..10f96a1db 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -2143,6 +2143,10 @@ void wake_up( bool &wakeup) int CNeutrinoApp::run(int argc, char **argv) { + puts("[neutrino] executing " NEUTRINO_APP_START_SCRIPT "."); + if (my_system(NEUTRINO_APP_START_SCRIPT) != 0) + perror(NEUTRINO_APP_START_SCRIPT " failed"); + CmdParser(argc, argv); TIMER_START();