From 84374a8af0da497a2a686a23b8c2c0f0676f6e4c Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Fri, 15 Nov 2019 22:13:53 -0700 Subject: [PATCH] Adds ability to set program to not load config on next boot via console commands --- PepperDashEssentials/ControlSystem.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/PepperDashEssentials/ControlSystem.cs b/PepperDashEssentials/ControlSystem.cs index c080c1b2..4c66f195 100644 --- a/PepperDashEssentials/ControlSystem.cs +++ b/PepperDashEssentials/ControlSystem.cs @@ -40,11 +40,11 @@ namespace PepperDash.Essentials { DeterminePlatform(); - //if (Debug.DoNotLoadOnNextBoot) - //{ - // CrestronConsole.AddNewConsoleCommand(s => GoWithLoad(), "go", "Loads configuration file", - // ConsoleAccessLevelEnum.AccessOperator); - //} + if (Debug.DoNotLoadOnNextBoot) + { + CrestronConsole.AddNewConsoleCommand(s => GoWithLoad(), "go", "Loads configuration file", + ConsoleAccessLevelEnum.AccessOperator); + } // CrestronConsole.AddNewConsoleCommand(S => { ConfigWriter.WriteConfigFile(null); }, "writeconfig", "writes the current config to a file", ConsoleAccessLevelEnum.AccessOperator); CrestronConsole.AddNewConsoleCommand(s => @@ -74,7 +74,7 @@ namespace PepperDash.Essentials "Template URL: {1}", ConfigReader.ConfigObject.SystemUrl, ConfigReader.ConfigObject.TemplateUrl); }, "portalinfo", "Shows portal URLS from configuration", ConsoleAccessLevelEnum.AccessOperator); - //if(!Debug.DoNotLoadOnNextBoot) + if (!Debug.DoNotLoadOnNextBoot) GoWithLoad(); } @@ -152,7 +152,7 @@ namespace PepperDash.Essentials { try { - //Debug.SetDoNotLoadOnNextBoot(false); + Debug.SetDoNotLoadOnNextBoot(false); Debug.Console(0, Debug.ErrorLogLevel.Notice, "Starting Essentials load from configuration");