mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
- shutdown_count.cpp: add NEUTRINO_ENTER_INACTIVITY_SCRIPT
script will be executed if g_settings.shutdown_min expires
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include <global.h>
|
||||
#include <neutrino.h>
|
||||
#include <system/settings.h>
|
||||
#include <system/helpers.h>
|
||||
|
||||
#include <sys/timeb.h>
|
||||
#include <time.h>
|
||||
@@ -106,6 +107,11 @@ void SHTDCNT::shutdown_counter()
|
||||
sleep_cnt--;
|
||||
} else if(sleeptimer_active && !CNeutrinoApp::getInstance ()->recordingstatus) {
|
||||
sleeptimer_active = false;
|
||||
|
||||
puts("[SHTDCNT] executing " NEUTRINO_ENTER_INACTIVITY_SCRIPT ".");
|
||||
if (my_system(NEUTRINO_ENTER_INACTIVITY_SCRIPT) != 0)
|
||||
perror(NEUTRINO_ENTER_INACTIVITY_SCRIPT " failed");
|
||||
|
||||
printf("[SHTDCNT] sleep-timer send NeutrinoMessages::SLEEPTIMER\n");
|
||||
g_RCInput->postMsg(NeutrinoMessages::SLEEPTIMER, 1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user