mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
lcd4l.cpp: restart script after changing timezone
This commit is contained in:
@@ -199,6 +199,18 @@ void CLCD4l::StopLCD4l()
|
|||||||
OnError();
|
OnError();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CLCD4l::RestartLCD4lScript()
|
||||||
|
{
|
||||||
|
OnBeforeStart();
|
||||||
|
if (thrLCD4l && g_settings.lcd4l_support)
|
||||||
|
{
|
||||||
|
if (exec_initscript("lcd4linux", "restart", "systemctl"))
|
||||||
|
OnAfterStart();
|
||||||
|
else
|
||||||
|
OnError();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CLCD4l::SwitchLCD4l()
|
void CLCD4l::SwitchLCD4l()
|
||||||
{
|
{
|
||||||
if (thrLCD4l)
|
if (thrLCD4l)
|
||||||
@@ -947,11 +959,7 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
|
|||||||
m_Layout = Layout;
|
m_Layout = Layout;
|
||||||
if (!firstRun)
|
if (!firstRun)
|
||||||
{
|
{
|
||||||
OnBeforeRestart();
|
RestartLCD4lScript();
|
||||||
if (exec_initscript("lcd4linux", "restart", "systemctl"))
|
|
||||||
OnAfterRestart();
|
|
||||||
else
|
|
||||||
OnError();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -60,6 +60,7 @@ class CLCD4l
|
|||||||
void StartLCD4l();
|
void StartLCD4l();
|
||||||
void StopLCD4l();
|
void StopLCD4l();
|
||||||
void SwitchLCD4l();
|
void SwitchLCD4l();
|
||||||
|
void RestartLCD4lScript();
|
||||||
void ForceRun() { wait4daemon = false; }
|
void ForceRun() { wait4daemon = false; }
|
||||||
|
|
||||||
int CreateFile(const char *file, std::string content = "", bool convert = false);
|
int CreateFile(const char *file, std::string content = "", bool convert = false);
|
||||||
|
@@ -32,7 +32,9 @@
|
|||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef ENABLE_LCD4LINUX
|
||||||
|
#include "driver/lcd4l.h"
|
||||||
|
#endif
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "osdlang_setup.h"
|
#include "osdlang_setup.h"
|
||||||
@@ -126,6 +128,9 @@ int COsdLangSetup::showLocalSetup()
|
|||||||
delete localSettings;
|
delete localSettings;
|
||||||
delete langNotifier;
|
delete langNotifier;
|
||||||
delete tzNotifier;
|
delete tzNotifier;
|
||||||
|
#ifdef ENABLE_LCD4LINUX
|
||||||
|
CLCD4l::getInstance()->RestartLCD4lScript();
|
||||||
|
#endif
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user