mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 12:59:39 -07:00
#1460 looks like the permissions issue has been resolved. Just need to make sure the Ombi process is terminated.
Also fixed that we were not sending email notifications to users when something was available.
This commit is contained in:
parent
22a0e92b63
commit
c58cb4dbe1
6 changed files with 22 additions and 9 deletions
|
|
@ -5,6 +5,7 @@ using System.IO;
|
|||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
||||
namespace Ombi.Updater
|
||||
{
|
||||
|
|
@ -18,9 +19,16 @@ namespace Ombi.Updater
|
|||
|
||||
|
||||
// Make sure the process has been killed
|
||||
if (p.FindProcessByName("Ombi").Any())
|
||||
while (p.FindProcessByName("Ombi").Any())
|
||||
{
|
||||
// throw
|
||||
Console.WriteLine("Found another process called Ombi, KILLING!");
|
||||
var proc = p.FindProcessByName("Ombi").FirstOrDefault();
|
||||
if (proc != null)
|
||||
{
|
||||
Console.WriteLine($"[{proc.Id}] - {proc.Name} - Path: {proc.StartPath}");
|
||||
p.Kill(proc.Id);
|
||||
}
|
||||
Thread.Sleep(500);
|
||||
}
|
||||
|
||||
MoveFiles(options);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue