Compare commits

...
3 Commits
Author SHA1 Message Date
Kevin Darby 96724ae9ac where's stunnel? 2020-03-03 13:34:54 -05:00
Kevin Darby 46b3ab5da8 logging for stunnel check 2020-02-25 16:23:16 -05:00
Kevin Darby 19e66a1c32 add a new stunnel path for Pete 2020-02-25 11:16:40 -05:00
+22 -10
View File
@@ -115,22 +115,34 @@ namespace mbts.ui.shell
{
try
{
var path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\BTS\\stunnel\\";
if (File.Exists(path + "config\\stunnel.conf"))
{
uint job_error = BTSUINativeMethods.setup_process_job_object();
//if we can't put this process and stunnel into a job, try to stop stunnel then restart
if(job_error != 0)
kill_stunnel();
start_stunnel(path, job_error);
}
string path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\BTS\\stunnel\\";
Log.Ui.warn($"Looking for stunnel in {path}");
start_stunnel_from_path(path);
path = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory).FullName + "\\stunnel\\";
Log.Ui.warn($"Looking for stunnel in {path}");
start_stunnel_from_path(path);
path = "C:\\Program Files (x86)\\BTS\\stunnel\\";
Log.Ui.warn($"Last Time Looking for stunnel in {path}");
start_stunnel_from_path(path);
}
catch(Exception ex)
catch (Exception ex)
{
stunnel_job_error = "Error starting stunnel: " + ex.Message;
}
}
private void start_stunnel_from_path(string path)
{
if (File.Exists(path + "config\\stunnel.conf"))
{
uint job_error = BTSUINativeMethods.setup_process_job_object();
//if we can't put this process and stunnel into a job, try to stop stunnel then restart
if (job_error != 0)
kill_stunnel();
start_stunnel(path, job_error);
}
}
public new int Run() {
var argv = Environment.GetCommandLineArgs();
try {