Skip to content

Commit

Permalink
Merge pull request xkjyeah#10 from selvanair/autostart-config-dir
Browse files Browse the repository at this point in the history
Autostart config dir
  • Loading branch information
mattock authored Nov 29, 2018
2 parents 22e23e5 + f2cf5c2 commit b8aa93b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions OpenVpnService.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.3.0.%2a</ApplicationVersion>
<ApplicationVersion>1.4.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<ReleaseVersion>1.3.0.0</ReleaseVersion>
<ReleaseVersion>1.4.0.0</ReleaseVersion>
</PropertyGroup>
<PropertyGroup>
<StartupObject>OpenVpn.OpenVpnService</StartupObject>
Expand Down
2 changes: 1 addition & 1 deletion ProjectInstaller.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Service.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ protected override void OnStart(string[] args)
var config = new OpenVpnServiceConfiguration()
{
exePath = (string)rkOvpn.GetValue("exe_path"),
configDir = (string)rkOvpn.GetValue("config_dir"),
configDir = (string)rkOvpn.GetValue("autostart_config_dir"),
configExt = "." + (string)rkOvpn.GetValue("config_ext"),
logDir = (string)rkOvpn.GetValue("log_dir"),
logAppend = append,
Expand All @@ -106,7 +106,7 @@ protected override void OnStart(string[] args)
eventLog = EventLog,
};

if (configDirsConsidered.Contains(config.configDir)) {
if (String.IsNullOrEmpty(config.configDir) || configDirsConsidered.Contains(config.configDir)) {
continue;
}
configDirsConsidered.Add(config.configDir);
Expand Down

0 comments on commit b8aa93b

Please sign in to comment.