/// <summary> /// Thread to perform reboot /// </summary> private void RebootThread() { TvBusinessLayer layer = new TvBusinessLayer(); EPGWakeupConfig config = new EPGWakeupConfig((layer.GetSetting("PowerSchedulerRebootConfig", String.Empty).Value)); Log.Debug("RebootHandler: Reboot schedule {0:00}:{1:00} is due", config.Hour, config.Minutes); // Start external command RunExternalCommand("reboot"); // Trigger reboot Log.Info("RebootHandler: Reboot system"); IPowerScheduler ps = GlobalServiceProvider.Instance.Get <IPowerScheduler>(); ps.SuspendSystem("RebootHandler", (int)RestartOptions.Reboot, false); }
/// <summary> /// Thread to perform reboot /// </summary> private void RebootThread() { using (Settings reader = new MPSettings()) { EPGWakeupConfig config = new EPGWakeupConfig(reader.GetValueAsString("psclientplugin", "RebootConfig", String.Empty)); Log.Debug("RebootHandler: Reboot schedule {0:00}:{1:00} is due", config.Hour, config.Minutes); // Start external command RunExternalCommand("reboot"); // Trigger reboot Log.Info("RebootHandler: Reboot system"); IPowerScheduler ps = GlobalServiceProvider.Instance.Get <IPowerScheduler>(); ps.SuspendSystem("RebootHandler", (int)RestartOptions.Reboot, false); } }