File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
eFormAPI/Installation/CustomActions Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -118,8 +118,11 @@ public static ActionResult InstallCA(Session session)
118118 SaveInstances ( webApiName ) ;
119119 IncrementProgressBar ( session ) ;
120120
121- if ( session . CustomActionData [ "GENERATESSL" ] == "1" )
122- RunProcess ( Path . Combine ( installFolder , "letsencrypt\\ letsencrypt.exe" ) , $ "--plugin manual --manualhost { uiName } --webroot { session . CustomActionData [ "INSTALLFOLDER" ] . TrimEnd ( '\\ ' ) } ") ;
121+ if ( session . CustomActionData [ "GENERATESSL" ] == "1" )
122+ {
123+ var siteId = GetSiteId ( uiName ) ;
124+ RunProcess ( Path . Combine ( installFolder , "letsencrypt\\ letsencrypt.exe" ) , $ "--plugin iissite --siteid { siteId } --accepttos --usedefaulttaskuser") ;
125+ }
123126
124127 DeleteDirectory ( Path . Combine ( installFolder , "letsencrypt" ) ) ;
125128 IncrementProgressBar ( session ) ;
@@ -133,6 +136,14 @@ public static ActionResult InstallCA(Session session)
133136 }
134137 }
135138
139+ private static long GetSiteId ( string uiName )
140+ {
141+ using ( var serverManager = new ServerManager ( ) )
142+ {
143+ return serverManager . Sites [ uiName ] . Id ;
144+ }
145+ }
146+
136147 public static MessageResult ResetProgressBar ( Session session , int totalStatements )
137148 {
138149 var record = new Record ( 3 ) ;
You can’t perform that action at this time.
0 commit comments