private async Task InitUpdateAsync(string updateFileName) { if (string.IsNullOrEmpty(updateFileName)) { return; } if (OS.IsUnix) { string executable = Path.Combine(Constants.HomeDirectory, Constants.GitProjectName + ".dll"); if (File.Exists(executable)) { OS.UnixSetFileAccessExecutable(executable); Logger.Info("File Permission set successfully!"); } } ModuleLoader.ExecuteActionOnType <IEvent>((e) => e.OnUpdateStarted()); ModuleLoader.ExecuteActionOnType <IAsyncEvent>(async(e) => await e.OnUpdateStarted().ConfigureAwait(false)); await Update(updateFileName).ConfigureAwait(false); // starting luna again after update using (OSCommandLineInterfacer cl = new OSCommandLineInterfacer(OSPlatform.Linux, true)) { cl.Execute($"cd {Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), "Luna")}"); cl.Execute("dotnet Luna.dll"); } }
internal WiringPiDriver(InternalLogger logger, PinsWrapper pins, PinConfig pinConfig, NumberingScheme scheme) : base(logger, pins, GpioDriver.WiringPiDriver, pinConfig, scheme) { CommandLine = new OSCommandLineInterfacer(OSPlatform.Linux, false, false, false); }