diff --git a/src/Ombi.Schedule/Jobs/Ombi/OmbiAutomaticUpdater.cs b/src/Ombi.Schedule/Jobs/Ombi/OmbiAutomaticUpdater.cs index 6d5057bcf..77f3375c2 100644 --- a/src/Ombi.Schedule/Jobs/Ombi/OmbiAutomaticUpdater.cs +++ b/src/Ombi.Schedule/Jobs/Ombi/OmbiAutomaticUpdater.cs @@ -233,7 +233,7 @@ namespace Ombi.Schedule.Jobs.Ombi private void RunScript(UpdateSettings settings, string downloadUrl) { - var scriptToRun = settings.ScriptLocation; + var scriptToRun = settings?.ScriptLocation ?? string.Empty; if (scriptToRun.IsNullOrEmpty()) { Logger.LogError("Use Script is enabled but there is no script to run"); @@ -245,10 +245,8 @@ namespace Ombi.Schedule.Jobs.Ombi Logger.LogError("Cannot find the file {0}", scriptToRun); return; } - - var ombiProcess = _processProvider.FindProcessByName(settings.ProcessName).FirstOrDefault(); - var currentInstallLocation = Assembly.GetEntryAssembly().Location; - _processProvider.Start(scriptToRun, downloadUrl + " " + ombiProcess.Id + " " + GetArgs(settings)); + + _processProvider.Start(scriptToRun, downloadUrl + " " + GetArgs(settings)); Logger.LogInformation("Script started"); }