File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
letsencrypt/src/main/java/httpsmanager/letsencrypt Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -141,13 +141,16 @@ public void allChallengesAccepted() {
141
141
142
142
private void saveDomainFiles (Acme4jRequest req ) {
143
143
final String basePath = HttpsManager2App .config .getCertificates ().getLocal () + "/" ;
144
- for (Domain domain : new DomainAccess ().list ()) {
145
- Logger .info (" saving domain files for " + domain .getPublicDomain ());
146
- String path = basePath + domain .getPublicDomain () + "/" ;
147
- copy (req .getDomainChainFile (), path + "fullchain.pem" );
148
- copy (req .getDomainKeyFile (), path + "privkey.pem" );
149
- }
150
- }
144
+ for (Domain domain : new DomainAccess ().list ()) {
145
+ if (!req .getDomains ().contains (domain .getPublicDomain ())) {
146
+ continue ;
147
+ }
148
+ Logger .info (" saving domain files for " + domain .getPublicDomain ());
149
+ String path = basePath + domain .getPublicDomain () + "/" ;
150
+ copy (req .getDomainChainFile (), path + "fullchain.pem" );
151
+ copy (req .getDomainKeyFile (), path + "privkey.pem" );
152
+ }
153
+ }
151
154
152
155
private void copy (File sourceFile , String targetFile ) {
153
156
File tf = new File (targetFile );
You can’t perform that action at this time.
0 commit comments