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.
This commit is contained in:
2017-06-15 01:01:55 +02:00
parent 5fda283a61
commit 78f1b294a9
2 changed files with 5 additions and 0 deletions

View File

@@ -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"

View File

@@ -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();